[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1b77ad01-9621-4d2e-84c0-077032fbc5ef@intel.com>
Date: Tue, 10 Dec 2024 16:24:30 +0100
From: Cezary Rojewski <cezary.rojewski@...el.com>
To: Wesley Cheng <quic_wcheng@...cinc.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 2024-12-06 9:43 PM, Wesley Cheng wrote:
>
> On 12/6/2024 1:09 AM, Cezary Rojewski wrote:
...
>>>>> +#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?
Well, some may call this a common sense. ASoC is founded on ALSA. There
are no ALSA-core components which I'm aware of which have a dependency
on ASoC components. You may not get compilation problems now, but such
approach does not scale and will hit circular dependency problem sooner
or later.
Kind regards,
Czarek
Powered by blists - more mailing lists