Lines Matching +full:pcm +full:- +full:platform
12 an implementation that allows for an alternate power-optimized path in the audio
22 | | ASoC Platform card |
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
62 The snd_soc_usb structure can be referenced using the ASoC platform card
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
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
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
113 .. code-block:: rst
118 - ``usbdev``: the usb device that was removed
119 - ``sdev``: capabilities to free
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
147 the platform sound card. This will allow for consistent naming to be used on
153 .. code-block:: rst
155 int snd_soc_usb_update_offload_route(struct device *dev, int card, int pcm,
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
166 an array of two integers that will carry the card and pcm device indexes
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",
268 --------------------------------
277 .. code-block:: rst
289 snd_soc_usb_disconnect(usb_get_usb_backend(chip->dev), dev->sdev);
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
340 -------
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
364 **PCM Devices**:
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 (*) []
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)
395 The above example shows a scenario where the system has one ASoC platform card
398 the mapped offload card and pcm device indexes for the specific USB device:
400 ``USB Offload Playback Card Route PCM#*``
402 ``USB Offload Playback PCM Route PCM#*``
405 several PCM devices. The above kcontrols are defined as:
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.
413 for the kcontrol along with the PCM route kcontrol.
415 - ``USB Offload Playback PCM Route PCM#`` **(R)**: Returns the ASoC platform sound
416 PCM device index for a mapped offload path. The output **"1"** (PCM device index)
418 PCM device#0. If **"-1"** is seen, then no offload path is available for the USB\
424 -----------------------------------
428 .. code-block:: rst
431 int card, int pcm, int direction,
436 These are specific for the **USB Offload Playback Card Route PCM#** and **USB
437 Offload PCM Route PCM#** kcontrols.
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 ---------------------------
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)