Lines Matching +full:audio +full:- +full:related
11 One potential use case would be to support USB audio offloading, which is
12 an implementation that allows for an alternate power-optimized path in the audio
13 subsystem to handle the transfer of audio data over the USB bus. This would
32 | |SoC-USB | |
34 |USB SND |<--->|USBSND |<------------>|________| |
35 |(card.c)| |offld |<---------- |
43 | | | |->|audio DSP |
45 |XHCI HCD |<- |
52 ----------
55 - ``list``: list head for SND SoC struct list
56 - ``component``: reference to ASoC component
57 - ``connection_status_cb``: callback to notify connection events
58 - ``update_offload_route_info``: callback to fetch selected USB sound card/PCM
60 - ``priv_data``: driver data
63 device, or a USB device (udev->dev). This is created by the ASoC BE DAI
69 - ``card_idx``: sound card index associated with USB sound device
70 - ``chip_idx``: USB sound chip array index
71 - ``cpcm_idx``: capture pcm device indexes associated with the USB sound device
72 - ``ppcm_idx``: playback pcm device indexes associated with the USB sound device
73 - ``num_playback``: number of playback streams
74 - ``num_capture``: number of capture streams
75 - ``list``: list head for the USB sound device list
79 determine the possible offloading paths for this USB audio device.
82 ---------
83 .. code-block:: rst
89 - ``card_idx``: the index into the USB sound chip array.
90 - ``params``: Requested PCM parameters from the USB DPCM BE DAI link
91 - ``direction``: capture or playback
93 **snd_soc_usb_find_supported_format()** ensures that the requested audio profile
96 Returns 0 on success, and -EOPNOTSUPP on failure.
98 .. code-block:: rst
103 - ``usbdev``: the usb device that was discovered
104 - ``sdev``: capabilities of the device
107 audio device detection. This can be utilized in the BE DAI
108 driver to keep track of available USB audio devices. This is intended
113 .. code-block:: rst
118 - ``usbdev``: the usb device that was removed
119 - ``sdev``: capabilities to free
122 audio device removal. This is intended to be called by the USB offload
125 .. code-block:: rst
130 - ``usbdev``: the usb device to reference to find private data
137 .. code-block:: rst
143 - ``component``: ASoC component to add the jack
144 - ``jack``: jack component to populate
148 designs that support USB audio offloading. Additionally, this will enable the
153 .. code-block:: rst
160 - ``dev``: USB device to look up offload path mapping
161 - ``card``: USB sound card index
162 - ``pcm``: USB sound PCM device index
163 - ``direction``: direction to fetch offload routing information
164 - ``path``: kcontrol selector - pcm device or card index
165 - ``route``: mapping of sound card and pcm indexes for the offload path. This is
171 link to fetch the information about the mapped ASoC devices for executing USB audio
177 .. code-block:: rst
183 - ``component``: DPCM BE DAI link component
184 - ``data``: private data
191 .. code-block:: rst
196 - ``usb``: SoC USB device to free
200 .. code-block:: rst
205 - ``usb``: SoC USB device to add
210 .. code-block:: rst
215 - ``usb``: SoC USB device to remove
222 --------------------------
228 .. code-block:: rst
233 data->usb = snd_soc_usb_allocate_port(component, 1, &data->priv);
234 if (!data->usb)
235 return -ENOMEM;
237 usb->connection_status_cb = q6usb_alsa_connection_cb;
241 dev_err(component->dev, "failed to add usb port\n");
250 snd_soc_usb_remove_port(data->usb);
251 snd_soc_usb_free_port(data->usb);
257 .name = "q6usb-dai-component",
267 USB Audio Device Connection Flow
268 --------------------------------
271 port, i.e. if there are any USB devices with audio interface(s) connected.
277 .. code-block:: rst
289 snd_soc_usb_disconnect(usb_get_usb_backend(chip->dev), dev->sdev);
296 connect events for any identified USB audio interfaces. Consider the
300 | --> USB audio streams allocated and saved to usb_chip[]
301 | --> Propagate connect event to USB offload driver in USB SND
302 | --> **snd_soc_usb_connect()** exits as USB BE DAI link is not ready
305 | --> DAI link is probed and SoC USB port is allocated
306 | --> The USB audio device connect event is missed
313 | --> DAI link is probed and SoC USB port is allocated
314 | --> SoC USB device added, and **snd_usb_rediscover_devices()** runs
317 | --> Traverses through usb_chip[] and for non-NULL entries issue
325 | --> USB audio streams allocated and saved to usb_chip[]
326 | --> Propagate connect event to USB offload driver in USB SND
327 | --> USB offload driver **NOT** ready!
330 | --> DAI link is probed and SoC USB port is allocated
331 | --> No USB connect event due to missing USB offload driver
334 | --> **qc_usb_audio_offload_init()**
335 | --> Calls **snd_usb_rediscover_devices()** to notify of devices
337 USB Offload Related Kcontrols
340 -------
342 devices to enable USB audio offloading. SoC USB exposes the get_offload_dev()
347 --------------
355 0 [SM8250MTPWCD938]: sm8250 - SM8250-MTP-WCD9380-WSA8810-VA-D
356 SM8250-MTP-WCD9380-WSA8810-VA-DMIC
357 1 [Seri ]: USB-Audio - Plantronics Blackwire 3225 Seri
359 3225 Seri at usb-xhci-hcd.1.auto-1.1,
361 2 [C320M ]: USB-Audio - Plantronics C320-M
362 Plantronics Plantronics C320-M at usb-xhci-hcd.1.auto-1.2, full speed
368 card 0: SM8250MTPWCD938 [SM8250-MTP-WCD9380-WSA8810-VA-D], device 0: MultiMedia1 (*) []
371 card 0: SM8250MTPWCD938 [SM8250-MTP-WCD9380-WSA8810-VA-D], device 1: MultiMedia2 (*) []
374 card 1: Seri [Plantronics Blackwire 3225 Seri], device 0: USB Audio [USB Audio]
377 card 2: C320M [Plantronics C320-M], device 0: USB Audio [USB Audio]
381 **USB Sound Card** - card#1:
385 USB Offload Playback Card Route PCM#0 -1 (range -1->32)
386 USB Offload Playback PCM Route PCM#0 -1 (range -1->255)
388 **USB Sound Card** - card#2:
392 USB Offload Playback Card Route PCM#0 0 (range -1->32)
393 USB Offload Playback PCM Route PCM#0 1 (range -1->255)
397 the available kcontrols for each USB audio device, the following kcontrols lists
404 The kcontrol is indexed, because a USB audio device could potentially have
407 - ``USB Offload Playback Card Route PCM#`` **(R)**: Returns the ASoC platform sound
410 If **"-1"** is seen, then no offload path is available for the USB SND device.
411 This kcontrol exists for each USB audio device that exists in the system, and
415 - ``USB Offload Playback PCM Route PCM#`` **(R)**: Returns the ASoC platform sound
418 PCM device#0. If **"-1"** is seen, then no offload path is available for the USB\
419 SND device. This kcontrol exists for each USB audio device that exists in the
424 -----------------------------------
425 In order to allow for vendor specific implementations on audio offloading device
428 .. code-block:: rst
444 .. code-block:: rst
449 usb = snd_soc_usb_allocate_port(component, 1, &data->priv);
451 return -ENOMEM;
453 usb->connection_status_cb = q6usb_alsa_connection_cb;
454 usb->update_offload_route_info = q6usb_get_offload_dev;
460 ---------------------------
464 modify characteristics pertaining to the USB audio device.
470 0 INT 2 Capture Channel Map 0, 0 (range 0->36)
471 1 INT 2 Playback Channel Map 0, 0 (range 0->36)
473 3 INT 1 Headset Capture Volume 10 (range 0->13)
475 5 INT 1 Sidetone Playback Volume 4096 (range 0->8192)
477 7 INT 2 Headset Playback Volume 20, 20 (range 0->24)
478 8 INT 1 USB Offload Playback Card Route PCM#0 0 (range -1->32)
479 9 INT 1 USB Offload Playback PCM Route PCM#0 1 (range -1->255)
481 Since USB audio device controls are handled over the USB control endpoint, use the