Re: [PATCH 01/10] ASoC: soc-acpi: expand description of _ADR-based devices

From: Pierre-Louis Bossart
Date: Fri Mar 13 2020 - 13:28:21 EST



 static const struct snd_soc_acpi_link_adr icl_3_in_1_default[] = {
ÂÂÂÂÂ {
ÂÂÂÂÂÂÂÂÂ .mask = BIT(0),
ÂÂÂÂÂÂÂÂÂ .num_adr = ARRAY_SIZE(rt711_0_adr),
-ÂÂÂÂÂÂÂ .adr = rt711_0_adr,
+ÂÂÂÂÂÂÂ .adr_d = rt711_0_adr,
ÂÂÂÂÂ },
ÂÂÂÂÂ {
ÂÂÂÂÂÂÂÂÂ .mask = BIT(1),
-ÂÂÂÂÂÂÂ .num_adr = ARRAY_SIZE(rt1308_1_adr),
-ÂÂÂÂÂÂÂ .adr = rt1308_1_adr,
+ÂÂÂÂÂÂÂ .num_adr = ARRAY_SIZE(rt1308_1_group1_adr),
+ÂÂÂÂÂÂÂ .adr_d = rt1308_1_adr,

Is this right, you use different struct in ARRAY_SIZE and assignment?

ÂÂÂÂÂ },
ÂÂÂÂÂ {
ÂÂÂÂÂÂÂÂÂ .mask = BIT(2),
-ÂÂÂÂÂÂÂ .num_adr = ARRAY_SIZE(rt1308_2_adr),
-ÂÂÂÂÂÂÂ .adr = rt1308_2_adr,
+ÂÂÂÂÂÂÂ .num_adr = ARRAY_SIZE(rt1308_2_group1_adr),
+ÂÂÂÂÂÂÂ .adr_d = rt1308_2_adr,

Same here.

it's of course an editing issue, thanks for spotting this.
it should be the exact same things as the structure used for cml:

static const struct snd_soc_acpi_link_adr cml_3_in_1_default[] = {
{
.mask = BIT(0),
.num_adr = ARRAY_SIZE(rt711_0_adr),
.adr_d = rt711_0_adr,
},
{
.mask = BIT(1),
.num_adr = ARRAY_SIZE(rt1308_1_group1_adr),
.adr_d = rt1308_1_group1_adr,
},
{
.mask = BIT(2),
.num_adr = ARRAY_SIZE(rt1308_2_group1_adr),
.adr_d = rt1308_2_group1_adr,
},
{
.mask = BIT(3),
.num_adr = ARRAY_SIZE(rt715_3_adr),
l .adr_d = rt715_3_adr,
},
{}
};