diff options
-rw-r--r-- | sound/soc/codecs/Kconfig | 1 | ||||
-rw-r--r-- | sound/soc/codecs/rl6231.c | 1 | ||||
-rw-r--r-- | sound/soc/codecs/rl6347a.c | 2 | ||||
-rw-r--r-- | sound/soc/codecs/rt298.c | 24 | ||||
-rw-r--r-- | sound/soc/rockchip/rk3399_gru_sound.c | 8 | ||||
-rw-r--r-- | sound/soc/rockchip/rockchip_max98090.c | 2 | ||||
-rw-r--r-- | sound/soc/rockchip/rockchip_rt5645.c | 2 |
7 files changed, 30 insertions, 10 deletions
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig index b70ae9abbc80..69a2f35c92b2 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig | |||
@@ -690,7 +690,6 @@ config SND_SOC_RL6347A | |||
690 | 690 | ||
691 | config SND_SOC_RT286 | 691 | config SND_SOC_RT286 |
692 | tristate | 692 | tristate |
693 | select SND_SOC_RT5663 | ||
694 | depends on I2C | 693 | depends on I2C |
695 | 694 | ||
696 | config SND_SOC_RT298 | 695 | config SND_SOC_RT298 |
diff --git a/sound/soc/codecs/rl6231.c b/sound/soc/codecs/rl6231.c index 1dc68ab08a17..7b447d0b173a 100644 --- a/sound/soc/codecs/rl6231.c +++ b/sound/soc/codecs/rl6231.c | |||
@@ -102,6 +102,7 @@ struct pll_calc_map { | |||
102 | }; | 102 | }; |
103 | 103 | ||
104 | static const struct pll_calc_map pll_preset_table[] = { | 104 | static const struct pll_calc_map pll_preset_table[] = { |
105 | {19200000, 4096000, 23, 14, 1, false}, | ||
105 | {19200000, 24576000, 3, 30, 3, false}, | 106 | {19200000, 24576000, 3, 30, 3, false}, |
106 | }; | 107 | }; |
107 | 108 | ||
diff --git a/sound/soc/codecs/rl6347a.c b/sound/soc/codecs/rl6347a.c index a4b910efbd45..8f571cf8edd4 100644 --- a/sound/soc/codecs/rl6347a.c +++ b/sound/soc/codecs/rl6347a.c | |||
@@ -51,7 +51,7 @@ int rl6347a_hw_write(void *context, unsigned int reg, unsigned int value) | |||
51 | if (ret == 4) | 51 | if (ret == 4) |
52 | return 0; | 52 | return 0; |
53 | else | 53 | else |
54 | pr_err("ret=%d\n", ret); | 54 | dev_err(&client->dev, "I2C error %d\n", ret); |
55 | if (ret < 0) | 55 | if (ret < 0) |
56 | return ret; | 56 | return ret; |
57 | else | 57 | else |
diff --git a/sound/soc/codecs/rt298.c b/sound/soc/codecs/rt298.c index 2db8179047ae..7150a407ffd9 100644 --- a/sound/soc/codecs/rt298.c +++ b/sound/soc/codecs/rt298.c | |||
@@ -326,11 +326,31 @@ static void rt298_jack_detect_work(struct work_struct *work) | |||
326 | int rt298_mic_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack) | 326 | int rt298_mic_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack) |
327 | { | 327 | { |
328 | struct rt298_priv *rt298 = snd_soc_codec_get_drvdata(codec); | 328 | struct rt298_priv *rt298 = snd_soc_codec_get_drvdata(codec); |
329 | struct snd_soc_dapm_context *dapm; | ||
330 | bool hp = false; | ||
331 | bool mic = false; | ||
332 | int status = 0; | ||
333 | |||
334 | /* If jack in NULL, disable HS jack */ | ||
335 | if (!jack) { | ||
336 | regmap_update_bits(rt298->regmap, RT298_IRQ_CTRL, 0x2, 0x0); | ||
337 | dapm = snd_soc_codec_get_dapm(codec); | ||
338 | snd_soc_dapm_disable_pin(dapm, "LDO1"); | ||
339 | snd_soc_dapm_sync(dapm); | ||
340 | return 0; | ||
341 | } | ||
329 | 342 | ||
330 | rt298->jack = jack; | 343 | rt298->jack = jack; |
344 | regmap_update_bits(rt298->regmap, RT298_IRQ_CTRL, 0x2, 0x2); | ||
331 | 345 | ||
332 | /* Send an initial empty report */ | 346 | rt298_jack_detect(rt298, &hp, &mic); |
333 | snd_soc_jack_report(rt298->jack, 0, | 347 | if (hp == true) |
348 | status |= SND_JACK_HEADPHONE; | ||
349 | |||
350 | if (mic == true) | ||
351 | status |= SND_JACK_MICROPHONE; | ||
352 | |||
353 | snd_soc_jack_report(rt298->jack, status, | ||
334 | SND_JACK_MICROPHONE | SND_JACK_HEADPHONE); | 354 | SND_JACK_MICROPHONE | SND_JACK_HEADPHONE); |
335 | 355 | ||
336 | return 0; | 356 | return 0; |
diff --git a/sound/soc/rockchip/rk3399_gru_sound.c b/sound/soc/rockchip/rk3399_gru_sound.c index 9ed735a6cf49..3475c61a5fa0 100644 --- a/sound/soc/rockchip/rk3399_gru_sound.c +++ b/sound/soc/rockchip/rk3399_gru_sound.c | |||
@@ -38,7 +38,7 @@ | |||
38 | 38 | ||
39 | #define SOUND_FS 256 | 39 | #define SOUND_FS 256 |
40 | 40 | ||
41 | unsigned int rt5514_dmic_delay; | 41 | static unsigned int rt5514_dmic_delay; |
42 | 42 | ||
43 | static struct snd_soc_jack rockchip_sound_jack; | 43 | static struct snd_soc_jack rockchip_sound_jack; |
44 | 44 | ||
@@ -228,15 +228,15 @@ static int rockchip_sound_da7219_init(struct snd_soc_pcm_runtime *rtd) | |||
228 | return 0; | 228 | return 0; |
229 | } | 229 | } |
230 | 230 | ||
231 | static struct snd_soc_ops rockchip_sound_max98357a_ops = { | 231 | static const struct snd_soc_ops rockchip_sound_max98357a_ops = { |
232 | .hw_params = rockchip_sound_max98357a_hw_params, | 232 | .hw_params = rockchip_sound_max98357a_hw_params, |
233 | }; | 233 | }; |
234 | 234 | ||
235 | static struct snd_soc_ops rockchip_sound_rt5514_ops = { | 235 | static const struct snd_soc_ops rockchip_sound_rt5514_ops = { |
236 | .hw_params = rockchip_sound_rt5514_hw_params, | 236 | .hw_params = rockchip_sound_rt5514_hw_params, |
237 | }; | 237 | }; |
238 | 238 | ||
239 | static struct snd_soc_ops rockchip_sound_da7219_ops = { | 239 | static const struct snd_soc_ops rockchip_sound_da7219_ops = { |
240 | .hw_params = rockchip_sound_da7219_hw_params, | 240 | .hw_params = rockchip_sound_da7219_hw_params, |
241 | }; | 241 | }; |
242 | 242 | ||
diff --git a/sound/soc/rockchip/rockchip_max98090.c b/sound/soc/rockchip/rockchip_max98090.c index e70ffad07184..789d6f1e2b5f 100644 --- a/sound/soc/rockchip/rockchip_max98090.c +++ b/sound/soc/rockchip/rockchip_max98090.c | |||
@@ -119,7 +119,7 @@ static int rk_aif1_hw_params(struct snd_pcm_substream *substream, | |||
119 | return ret; | 119 | return ret; |
120 | } | 120 | } |
121 | 121 | ||
122 | static struct snd_soc_ops rk_aif1_ops = { | 122 | static const struct snd_soc_ops rk_aif1_ops = { |
123 | .hw_params = rk_aif1_hw_params, | 123 | .hw_params = rk_aif1_hw_params, |
124 | }; | 124 | }; |
125 | 125 | ||
diff --git a/sound/soc/rockchip/rockchip_rt5645.c b/sound/soc/rockchip/rockchip_rt5645.c index 440a8026346a..9e0c17805807 100644 --- a/sound/soc/rockchip/rockchip_rt5645.c +++ b/sound/soc/rockchip/rockchip_rt5645.c | |||
@@ -135,7 +135,7 @@ static int rk_init(struct snd_soc_pcm_runtime *runtime) | |||
135 | &headset_jack); | 135 | &headset_jack); |
136 | } | 136 | } |
137 | 137 | ||
138 | static struct snd_soc_ops rk_aif1_ops = { | 138 | static const struct snd_soc_ops rk_aif1_ops = { |
139 | .hw_params = rk_aif1_hw_params, | 139 | .hw_params = rk_aif1_hw_params, |
140 | }; | 140 | }; |
141 | 141 | ||