Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
To: Nathan Chancellor <nathan@kernel.org>,
	Zhang Yi <zhangyi@everest-semi.com>
Cc: broonie@kernel.org, tiwai@suse.com, linux-sound@vger.kernel.org,
	peter.ujfalusi@linux.intel.com, yung-chuan.liao@linux.intel.com,
	ranjani.sridharan@linux.intel.com, kai.vehmanen@linux.intel.com,
	ckeepax@opensource.cirrus.com, vkoul@kernel.org
Subject: Re: [PATCH v15 3/6] ASoC: es9356-sdca: Add ES9356 SDCA driver
Date: Tue, 19 May 2026 14:42:08 +0200	[thread overview]
Message-ID: <22c7d187-b696-4411-99db-3af470f5fcab@linux.dev> (raw)
In-Reply-To: <20260518224657.GA536765@ax162>

On 5/19/26 00:46, Nathan Chancellor wrote:
> Hi,
> 
> On Thu, May 14, 2026 at 03:52:03PM +0800, Zhang Yi wrote:
>> This is the codec driver for es9356-sdca.
>>
>> Signed-off-by: Zhang Yi <zhangyi@everest-semi.com>
> ...
>> diff --git a/sound/soc/codecs/es9356.c b/sound/soc/codecs/es9356.c
>> new file mode 100644
>> index 000000000..78fddd9d0
>> --- /dev/null
>> +++ b/sound/soc/codecs/es9356.c
> ...
>> +static const struct snd_kcontrol_new es9356_sdca_controls[] = {
>> +	SDCA_SINGLE_Q78_TLV("FU41 Left Playback Volume",
>> +		SDW_SDCA_CTL(FUNC_NUM_UAJ, ES9356_SDCA_ENT_FU41, ES9356_SDCA_CTL_FU_VOLUME, CH_L),
>> +		ES9356_VOLUME_MIN, ES9356_VOLUME_MAX, ES9356_VOLUME_STEP, out_vol_tlv),
>> +	SDCA_SINGLE_Q78_TLV("FU41 Right Playback Volume",
>> +		SDW_SDCA_CTL(FUNC_NUM_UAJ, ES9356_SDCA_ENT_FU41, ES9356_SDCA_CTL_FU_VOLUME, CH_R),
>> +		ES9356_VOLUME_MIN, ES9356_VOLUME_MAX, ES9356_VOLUME_STEP, out_vol_tlv),
>> +	SDCA_SINGLE_Q78_TLV("FU36 Left Capture Volume",
>> +		SDW_SDCA_CTL(FUNC_NUM_UAJ, ES9356_SDCA_ENT_FU36, ES9356_SDCA_CTL_FU_VOLUME, CH_L),
>> +		ES9356_VOLUME_MIN, ES9356_VOLUME_MAX, ES9356_VOLUME_STEP, out_vol_tlv),
>> +	SDCA_SINGLE_Q78_TLV("FU36 Right Capture Volume",
>> +		SDW_SDCA_CTL(FUNC_NUM_UAJ, ES9356_SDCA_ENT_FU36, ES9356_SDCA_CTL_FU_VOLUME, CH_R),
>> +		ES9356_VOLUME_MIN, ES9356_VOLUME_MAX, ES9356_VOLUME_STEP, out_vol_tlv),
>> +	SDCA_SINGLE_Q78_TLV("FU33 Capture Volume",
>> +		SDW_SDCA_CTL(FUNC_NUM_UAJ, ES9356_SDCA_ENT_FU33, ES9356_SDCA_CTL_FU_CH_GAIN, 0),
>> +		ES9356_GAIN_MIN, ES9356_AMIC_GAIN_MAX, ES9356_AMIC_GAIN_STEP, amic_gain_tlv),
>> +	SDCA_SINGLE_Q78_TLV("FU21 Left Playback Volume",
>> +		SDW_SDCA_CTL(FUNC_NUM_AMP, ES9356_SDCA_ENT_FU21, ES9356_SDCA_CTL_FU_VOLUME, CH_L),
>> +		ES9356_VOLUME_MIN, ES9356_VOLUME_MAX, ES9356_VOLUME_STEP, out_vol_tlv),
>> +	SDCA_SINGLE_Q78_TLV("FU21 Right Playback Volume",
>> +		SDW_SDCA_CTL(FUNC_NUM_AMP, ES9356_SDCA_ENT_FU21, ES9356_SDCA_CTL_FU_VOLUME, CH_R),
>> +		ES9356_VOLUME_MIN, ES9356_VOLUME_MAX, ES9356_VOLUME_STEP, out_vol_tlv),
>> +	SDCA_SINGLE_Q78_TLV("FU113 Left Capture Volume",
>> +		SDW_SDCA_CTL(FUNC_NUM_MIC, ES9356_SDCA_ENT_FU113, ES9356_SDCA_CTL_FU_VOLUME, CH_L),
>> +		ES9356_VOLUME_MIN, ES9356_VOLUME_MAX, ES9356_VOLUME_STEP, out_vol_tlv),
>> +	SDCA_SINGLE_Q78_TLV("FU113 Right Capture Volume",
>> +		SDW_SDCA_CTL(FUNC_NUM_MIC, ES9356_SDCA_ENT_FU113, ES9356_SDCA_CTL_FU_VOLUME, CH_R),
>> +		ES9356_VOLUME_MIN, ES9356_VOLUME_MAX, ES9356_VOLUME_STEP, out_vol_tlv),
>> +	SDCA_SINGLE_Q78_TLV("FU11 Capture Volume",
>> +		SDW_SDCA_CTL(FUNC_NUM_MIC, ES9356_SDCA_ENT_FU11, ES9356_SDCA_CTL_FU_CH_GAIN, 0),
>> +		ES9356_GAIN_MIN, ES9356_DMIC_GAIN_MAX, ES9356_DMIC_GAIN_STEP, dmic_gain_tlv),
>> +};
> 
> The use of SDCA_SINGLE_Q78_TLV() can break the build for architectures
> that do not support ACPI, as CONFIG_SND_SOC_SDCA depends on ACPI and
> the driver does not actually select it, so it might not be enabled if
> another driver that does select it is not enabled:
> 
>   $ printf "CONFIG_%s=m\n" SOUNDWIRE SND_SOC_ES9356 >arch/arm/configs/repro.config
> 
>   $ make -skj"$(nproc)" ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- mrproper defconfig repro.config all
>   ERROR: modpost: "sdca_asoc_q78_get_volsw" [sound/soc/codecs/snd-soc-es9356.ko] undefined!
>   ERROR: modpost: "sdca_asoc_q78_put_volsw" [sound/soc/codecs/snd-soc-es9356.ko] undefined!
>   ...
> 
> Maybe something like this is needed?
> 
> diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
> index 5fdd0334c355..b9e8df5ddfd5 100644
> --- a/sound/soc/codecs/Kconfig
> +++ b/sound/soc/codecs/Kconfig
> @@ -1302,7 +1302,9 @@ config SND_SOC_ES8389
>  
>  config SND_SOC_ES9356
>          tristate "Everest Semi ES9356 CODEC SDW"
> +	depends on ACPI
>          depends on SOUNDWIRE
> +	select SND_SOC_SDCA
>          select REGMAP_SOUNDWIRE
>          select REGMAP_SOUNDWIRE_MBQ

Maybe this instead?

depends on SOUNDWIRE
depends on SND_SOC_SDCA

  



  reply	other threads:[~2026-05-19 12:42 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-14  7:52 [PATCH v15 0/6] Add es9356 focused SoundWire CODEC Zhang Yi
2026-05-14  7:52 ` [PATCH v15 1/6] ASoC: sdw_utils: add soc_sdw_es9356 Zhang Yi
2026-05-14  7:52 ` [PATCH v15 2/6] ASoC: sdw_utils: add ES9356 in codec_info_list Zhang Yi
2026-05-14  7:52 ` [PATCH v15 3/6] ASoC: es9356-sdca: Add ES9356 SDCA driver Zhang Yi
2026-05-14  8:36   ` Charles Keepax
2026-05-18 22:46   ` Nathan Chancellor
2026-05-19 12:42     ` Pierre-Louis Bossart [this message]
2026-05-19 16:23       ` Nathan Chancellor
2026-05-19 16:30         ` Mark Brown
2026-05-20 23:14           ` Nathan Chancellor
2026-05-29 13:30             ` Charles Keepax
2026-05-14  7:52 ` [PATCH v15 4/6] ASoC: Intel: soc-acpi: arl: Add es9356 support Zhang Yi
2026-05-14  7:52 ` [PATCH v15 5/6] ASoC: Intel: sof_sdw: add " Zhang Yi
2026-05-14  7:52 ` [PATCH v15 6/6] soundwire: intel_auxdevice: Add es9356 to wake_capable_list Zhang Yi
2026-05-14 15:11 ` (subset) [PATCH v15 0/6] Add es9356 focused SoundWire CODEC Vinod Koul
2026-05-15  2:29 ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=22c7d187-b696-4411-99db-3af470f5fcab@linux.dev \
    --to=pierre-louis.bossart@linux.dev \
    --cc=broonie@kernel.org \
    --cc=ckeepax@opensource.cirrus.com \
    --cc=kai.vehmanen@linux.intel.com \
    --cc=linux-sound@vger.kernel.org \
    --cc=nathan@kernel.org \
    --cc=peter.ujfalusi@linux.intel.com \
    --cc=ranjani.sridharan@linux.intel.com \
    --cc=tiwai@suse.com \
    --cc=vkoul@kernel.org \
    --cc=yung-chuan.liao@linux.intel.com \
    --cc=zhangyi@everest-semi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox