Skip to content

Commit 831d1af

Browse files
jwrdegoedelag-linaro
authored andcommitted
mfd: arizona-spi: Set pdata.hpdet_channel for ACPI enumerated devs
Commit 9e86b2a changed the channel used for HPDET detection (headphones vs lineout detection) from being hardcoded to ARIZONA_ACCDET_MODE_HPL (HP left channel) to it being configurable through arizona_pdata.hpdet_channel the DT/OF parsing added for filling arizona_pdata on devicetree platforms ensures that arizona_pdata.hpdet_channel gets set to ARIZONA_ACCDET_MODE_HPL when not specified in the devicetree-node. But on ACPI platforms where arizona_pdata is filled by arizona_spi_acpi_probe() arizona_pdata.hpdet_channel was not getting set, causing it to default to 0 aka ARIZONA_ACCDET_MODE_MIC. This causes headphones to get misdetected as line-out on some models. Fix this by setting hpdet_channel = ARIZONA_ACCDET_MODE_HPL. Fixes: e933836 ("mfd: arizona: Add support for ACPI enumeration of WM5102 connected over SPI") Signed-off-by: Hans de Goede <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
1 parent 1045056 commit 831d1af

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/mfd/arizona-spi.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,9 @@ static int arizona_spi_acpi_probe(struct arizona *arizona)
159159
arizona->pdata.micd_ranges = arizona_micd_aosp_ranges;
160160
arizona->pdata.num_micd_ranges = ARRAY_SIZE(arizona_micd_aosp_ranges);
161161

162+
/* Use left headphone speaker for HP vs line-out detection */
163+
arizona->pdata.hpdet_channel = ARIZONA_ACCDET_MODE_HPL;
164+
162165
return 0;
163166
}
164167

0 commit comments

Comments
 (0)