Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: TSCS42xx: Add headphone auto switching

Add headphone auto switching controls

Signed-off-by: Steven Eckhoff <steven.eckhoff.opensource@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Steven Eckhoff and committed by
Mark Brown
53af408c 19d996cc

+14
+6
sound/soc/codecs/tscs42xx.c
··· 647 647 /* Mic Bias */ 648 648 SOC_SINGLE("Mic Bias Boost Switch", 0x71, 0x07, 1, 0), 649 649 650 + /* Headphone Auto Switching */ 651 + SOC_SINGLE("Headphone Auto Switching Switch", 652 + R_CTL, FB_CTL_HPSWEN, 1, 0), 653 + SOC_SINGLE("Headphone Detect Polarity Toggle Switch", 654 + R_CTL, FB_CTL_HPSWPOL, 1, 0), 655 + 650 656 /* Coefficient Ram */ 651 657 COEFF_RAM_CTL("Cascade1L BiQuad1", BIQUAD_SIZE, 0x00), 652 658 COEFF_RAM_CTL("Cascade1L BiQuad2", BIQUAD_SIZE, 0x05),
+8
sound/soc/codecs/tscs42xx.h
··· 34 34 #define R_DACSR 0x19 35 35 #define R_PWRM1 0x1A 36 36 #define R_PWRM2 0x1B 37 + #define R_CTL 0x1C 37 38 #define R_CONFIG0 0x1F 38 39 #define R_CONFIG1 0x20 39 40 #define R_DMICCTL 0x24 ··· 1111 1110 #define RV_PWRM2_VREF_DISABLE \ 1112 1111 RV(FV_PWRM2_VREF_DISABLE, FB_PWRM2_VREF) 1113 1112 1113 + /****************************** 1114 + * R_CTL (0x1C) * 1115 + ******************************/ 1116 + 1117 + /* Fiel Offsets */ 1118 + #define FB_CTL_HPSWEN 7 1119 + #define FB_CTL_HPSWPOL 6 1114 1120 1115 1121 /****************************** 1116 1122 * R_CONFIG0 (0x1F) *