[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3e246be8-22a9-4473-8c78-39788ae95650@quicinc.com>
Date: Fri, 6 Dec 2024 12:43:20 -0800
From: Wesley Cheng <quic_wcheng@...cinc.com>
To: Cezary Rojewski <cezary.rojewski@...el.com>
CC: <linux-kernel@...r.kernel.org>, <devicetree@...r.kernel.org>,
<linux-sound@...r.kernel.org>, <linux-usb@...r.kernel.org>,
<linux-input@...r.kernel.org>, <linux-arm-msm@...r.kernel.org>,
<linux-doc@...r.kernel.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>, <krzk+dt@...nel.org>,
<pierre-louis.bossart@...ux.intel.com>, <Thinh.Nguyen@...opsys.com>,
<tiwai@...e.com>, <robh@...nel.org>, <gregkh@...uxfoundation.org>
Subject: Re: [PATCH v30 28/30] ALSA: usb-audio: Add USB offload route kcontrol
On 12/6/2024 1:09 AM, Cezary Rojewski wrote:
> On 2024-12-04 12:15 AM, Wesley Cheng wrote:
>>
>> On 12/3/2024 8:13 AM, Cezary Rojewski wrote:
>>> On 2024-11-06 8:34 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.
>
> ...
>
>>> R) += mixer_usb_offload.o
>>>> diff --git a/sound/usb/mixer_usb_offload.c b/sound/usb/mixer_usb_offload.c
>>>> new file mode 100644
>>>> index 000000000000..e0689a3b9b86
>>>> --- /dev/null
>>>> +++ b/sound/usb/mixer_usb_offload.c
>>>> @@ -0,0 +1,102 @@
>>>> +// SPDX-License-Identifier: GPL-2.0
>>>> +/*
>>>> + * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
>>>> + */
>>>> +
>>>> +#include <linux/usb.h>
>>>> +
>>>> +#include <sound/core.h>
>>>> +#include <sound/control.h>
>>>> +#include <sound/soc-usb.h>
>>>
>>> ALSA-components should not be dependent on ASoC ones. It should be done the other way around: ALSA <- ASoC.
>>>
>>
>> At least for this kcontrol, we need to know the status of the ASoC state, so that we can communicate the proper path to userspace. If the ASoC path is not probed or ready, then this module isn't blocked. It will just communicate that there isn't a valid offload path.
>
> I'm not asking _why_ you need soc-usb.h header, your reasoning is probably perfectly fine. The code hierarchy is not though. If a sound module is dependent on soc-xxx.h i.e. ASoC symbols, it shall be part of sound/soc/ space.
That would basically require a significant change in the current design. Was that requirement documented somewhere, where ALSA components should not be dependent on ASoC? What was the reasoning for making it one direction, but not the other?
Thanks
Wesley Cheng
Powered by blists - more mailing lists