aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/soc/codecs/rt711.h
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2021-06-25 14:08:03 +0100
committerMark Brown <broonie@kernel.org>2021-06-25 14:08:03 +0100
commit192664528154a84fab4e6d820f9cb2e2e0835544 (patch)
tree4fd7c74097fc474150317fb04245460f0992af17 /sound/soc/codecs/rt711.h
parentMerge remote-tracking branch 'asoc/for-5.13' into asoc-linus (diff)
parentASoC: qcom: lpass-cpu: mark IRQ_CLEAR register as volatile and readable (diff)
downloadwireguard-linux-192664528154a84fab4e6d820f9cb2e2e0835544.tar.xz
wireguard-linux-192664528154a84fab4e6d820f9cb2e2e0835544.zip
Merge remote-tracking branch 'asoc/for-5.14' into asoc-next
Diffstat (limited to 'sound/soc/codecs/rt711.h')
-rw-r--r--sound/soc/codecs/rt711.h29
1 files changed, 28 insertions, 1 deletions
diff --git a/sound/soc/codecs/rt711.h b/sound/soc/codecs/rt711.h
index 2af467631435..f50f8c8d0934 100644
--- a/sound/soc/codecs/rt711.h
+++ b/sound/soc/codecs/rt711.h
@@ -54,7 +54,9 @@ struct sdw_stream_data {
/* Index (NID:20h) */
#define RT711_DAC_DC_CALI_CTL1 0x00
+#define RT711_JD_CTL1 0x08
#define RT711_JD_CTL2 0x09
+#define RT711_JD_CTL4 0x0b
#define RT711_CC_DET1 0x11
#define RT711_PARA_VERB_CTL 0x1a
#define RT711_COMBO_JACK_AUTO_CTL1 0x45
@@ -173,10 +175,33 @@ struct sdw_stream_data {
/* DAC DC offset calibration control-1 (0x00)(NID:20h) */
#define RT711_DAC_DC_CALI_TRIGGER (0x1 << 15)
+/* jack detect control 1 (0x08)(NID:20h) */
+#define RT711_JD2_DIGITAL_JD_MODE_SEL (0x1 << 1)
+#define RT711_JD2_1_JD_MODE (0x0 << 1)
+#define RT711_JD2_2_JD_MODE (0x1 << 1)
+
/* jack detect control 2 (0x09)(NID:20h) */
#define RT711_JD2_2PORT_200K_DECODE_HP (0x1 << 13)
+#define RT711_JD2_2PORT_100K_DECODE (0x1 << 12)
+#define RT711_JD2_2PORT_100K_DECODE_HP (0x0 << 12)
#define RT711_HP_JD_SEL_JD1 (0x0 << 1)
#define RT711_HP_JD_SEL_JD2 (0x1 << 1)
+#define RT711_JD2_1PORT_TYPE_DECODE (0x3 << 10)
+#define RT711_JD2_1PORT_JD_LINE2 (0x0 << 10)
+#define RT711_JD2_1PORT_JD_HP (0x1 << 10)
+#define RT711_JD2_1PORT_JD_LINE1 (0x2 << 10)
+#define RT711_JD1_2PORT_TYPE_100K_DECODE (0x1 << 0)
+#define RT711_JD1_2PORT_JD_RESERVED (0x0 << 0)
+#define RT711_JD1_2PORT_JD_LINE1 (0x1 << 0)
+
+/* jack detect control 4 (0x0b)(NID:20h) */
+#define RT711_JD2_PAD_PULL_UP_MASK (0x1 << 3)
+#define RT711_JD2_PAD_NOT_PULL_UP (0x0 << 3)
+#define RT711_JD2_PAD_PULL_UP (0x1 << 3)
+#define RT711_JD2_MODE_SEL_MASK (0x3 << 0)
+#define RT711_JD2_MODE0_2PORT (0x0 << 0)
+#define RT711_JD2_MODE1_3P3V_1PORT (0x1 << 0)
+#define RT711_JD2_MODE2_1P8V_1PORT (0x2 << 0)
/* CC DET1 (0x11)(NID:20h) */
#define RT711_HP_JD_FINAL_RESULT_CTL_JD12 (0x1 << 10)
@@ -217,7 +242,9 @@ enum {
enum rt711_jd_src {
RT711_JD_NULL,
RT711_JD1,
- RT711_JD2
+ RT711_JD2,
+ RT711_JD2_100K,
+ RT711_JD2_1P8V_1PORT
};
int rt711_io_init(struct device *dev, struct sdw_slave *slave);