Re: [PATCH v5 7/7] ASoC: codecs: add Qualcomm Tambora (WCD9378) SDCA codec
From: Srinivas Kandagatla
Date: Fri Sep 25 2026 - 16:31:47 EST
On 9/25/26 6:31 PM, Mark Brown wrote:
> On Fri, Sep 25, 2026 at 05:10:48PM +0100, Srinivas Kandagatla wrote:
>> Add support for the Qualcomm Tambora (WCD9378) headset codec in SDCA
>> mode over SoundWire. On ARM/DT platforms without ACPI/DisCo firmware
>> the SDCA topology and SoundWire port properties are supplied as static
>> data through the codec driver.
>
>> +static struct sdca_control entity_fu6_controls[] = {
>> + { .sel = SDCA_CTL_FU_MUTE, .mode = SDCA_ACCESS_MODE_DUAL,
>> + .layers = SDCA_ACCESS_LAYER_USER, .cn_list = 0x6, .nbits = 1,
>> + .type = SDCA_CTL_DATATYPE_ONEBIT,
>> + .interrupt_position = SDCA_NO_INTERRUPT,
>> + .has_reset = true, .reset = 1,
>> + .label = SDCA_CTL_MUTE_NAME },
>> + { .sel = SDCA_CTL_FU_CHANNEL_VOLUME, .mode = SDCA_ACCESS_MODE_DUAL,
>> + .layers = SDCA_ACCESS_LAYER_USER, .cn_list = 0x6, .nbits = 16,
>> + .type = SDCA_CTL_DATATYPE_Q7P8DB,
>> + .range = { .cols = SDCA_VOLUME_LINEAR_NCOLS, .rows = 1,
>> + .data = range_fu6_vol_data },
>> + .interrupt_position = SDCA_NO_INTERRUPT,
>> + .label = SDCA_CTL_CHANNEL_VOLUME_NAME },
>> +};
>
> Why do only these have nbits and type?
These are the the controls exposed to user as mute and Volume.
Looks like asoc_sdca.c does not use type and derive nbits, it directly
uses control->nbits. We can add the conversion in framework, if that is
something preferable.
--srini