[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <85b83e2a-bbb0-4dbb-aa8b-ca6e4e5806c2@quicinc.com>
Date: Thu, 16 Jan 2025 18:03:32 -0800
From: Wesley Cheng <quic_wcheng@...cinc.com>
To: Randy Dunlap <rdunlap@...radead.org>, <srinivas.kandagatla@...aro.org>,
<mathias.nyman@...el.com>, <perex@...ex.cz>, <conor+dt@...nel.org>,
<dmitry.torokhov@...il.com>, <corbet@....net>, <broonie@...nel.org>,
<lgirdwood@...il.com>, <tiwai@...e.com>, <krzk+dt@...nel.org>,
<pierre-louis.bossart@...ux.dev>, <Thinh.Nguyen@...opsys.com>,
<robh@...nel.org>, <gregkh@...uxfoundation.org>
CC: <linux-kernel@...r.kernel.org>, <devicetree@...r.kernel.org>,
<linux-sound@...r.kernel.org>, <linux-input@...r.kernel.org>,
<linux-usb@...r.kernel.org>, <linux-arm-msm@...r.kernel.org>,
<linux-doc@...r.kernel.org>
Subject: Re: [PATCH v33 30/31] ALSA: usb-audio: qcom: Add USB offload route
kcontrol
Hi Randy,
On 1/16/2025 5:45 PM, Wesley Cheng wrote:
> Hi Randy,
>
> On 1/16/2025 4:08 PM, Randy Dunlap wrote:
>> On 1/16/25 3:28 PM, Wesley Cheng wrote:
>>> 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@...cinc.com>
>>> ---
>>> sound/usb/Kconfig | 10 ++
>>> sound/usb/qcom/Makefile | 4 +
>>> sound/usb/qcom/mixer_usb_offload.c | 158 +++++++++++++++++++++++++++++
>>> sound/usb/qcom/mixer_usb_offload.h | 17 ++++
>>> sound/usb/qcom/qc_audio_offload.c | 2 +
>>> 5 files changed, 191 insertions(+)
>>> create mode 100644 sound/usb/qcom/mixer_usb_offload.c
>>> create mode 100644 sound/usb/qcom/mixer_usb_offload.h
>>>
>>> diff --git a/sound/usb/qcom/mixer_usb_offload.c b/sound/usb/qcom/mixer_usb_offload.c
>>> new file mode 100644
>>> index 000000000000..2696eb145ef5
>>> --- /dev/null
>>> +++ b/sound/usb/qcom/mixer_usb_offload.c
>>> @@ -0,0 +1,158 @@
>>> +// SPDX-License-Identifier: GPL-2.0
>>> +/*
>>> + * Copyright (c) 2022-2025 Qualcomm Innovation Center, Inc. All rights reserved.
>>> + */
>>> +
>>> +#include <linux/usb.h>
>>> +
>> [snip]
>>
>>> +
>>> +/**
>>> + * snd_usb_offload_create_ctl() - Add USB offload bounded mixer
>>> + * @chip - USB SND chip device
>> Use ':' instead of '-'.
>
> So to clarify, the ':' separator should be used for both structs and function descriptions? Just want to clarify, so I can fix them in all the spots.
>
>
Sorry, ignore this, I figured out what needs to be changed. You want the argument definition to use ":"
Thanks
Wesley Cheng
Powered by blists - more mailing lists