]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ALSA: usb-audio: qcom: Add USB offload route kcontrol
authorWesley Cheng <quic_wcheng@quicinc.com>
Wed, 9 Apr 2025 19:48:03 +0000 (12:48 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Apr 2025 11:02:33 +0000 (13:02 +0200)
commita67656f011d18c58a1e5c6744ba7d6061b5bfd3b
treef247eb70704cae99b818248a9c5c9489ffb68166
parent6a348e9236c336f363375a526b7b868667011121
ALSA: usb-audio: qcom: Add USB offload route kcontrol

In order to allow userspace/applications know about USB offloading status,
expose a sound kcontrol that fetches information about which sound card
and PCM index the USB device is mapped to for supporting offloading.  In
the USB audio offloading framework, the ASoC BE DAI link is the entity
responsible for registering to the SOC USB layer.

It is expected for the USB SND offloading driver to add the kcontrol to the
sound card associated with the USB audio device.  An example output would
look like:

tinymix -D 1 get 'USB Offload Playback Route PCM#0'
-1, -1 (range -1->255)

This example signifies that there is no mapped ASoC path available for the
USB SND device.

tinymix -D 1 get 'USB Offload Playback Route PCM#0'
0, 0 (range -1->255)

This example signifies that the offload path is available over ASoC sound
card index#0 and PCM device#0.

The USB offload kcontrol will be added in addition to the existing
kcontrols identified by the USB SND mixer.  The kcontrols used to modify
the USB audio device specific parameters are still valid and expected to be
used.  These parameters are not mirrored to the ASoC subsystem.

Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
Acked-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20250409194804.3773260-31-quic_wcheng@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/usb/qcom/Makefile
sound/usb/qcom/mixer_usb_offload.c [new file with mode: 0644]
sound/usb/qcom/mixer_usb_offload.h [new file with mode: 0644]
sound/usb/qcom/qc_audio_offload.c