[PATCH 3/3] ASoc: rt286: Handle headphones in combo jack correctly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If headphones are detected in the combo jack instead of a headset, set the
index register RT286_CBJ_CTRL1 to the correct value (from the HDA driver).

Signed-off-by: David Ward <david.ward@xxxxxxxxxx>
---
 sound/soc/codecs/rt286.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/sound/soc/codecs/rt286.c b/sound/soc/codecs/rt286.c
index c0129edf5993..7e67165a43e6 100644
--- a/sound/soc/codecs/rt286.c
+++ b/sound/soc/codecs/rt286.c
@@ -260,6 +260,12 @@ static int rt286_jack_detect(struct rt286_priv *rt286, bool *hp, bool *mic)
 				else
 					*mic = false;
 			}
+
+			if (!*mic) {
+				regmap_update_bits(rt286->regmap,
+					RT286_CBJ_CTRL1, 0xfcc0, 0xc400);
+			}
+
 			regmap_update_bits(rt286->regmap,
 				RT286_DC_GAIN, 0x200, 0x0);
 
-- 
2.30.1




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux