diff options
author | Takashi Iwai <tiwai@suse.de> | 2015-06-22 07:25:34 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-06-22 07:25:34 -0400 |
commit | c7988afde761cdb571b4e9e8d2ee741dea4b5389 (patch) | |
tree | 700cf9b74faa645803744141031ad0d07a3fa423 | |
parent | 57fa8a1e22c5833fb2cae96af68fc39ec21cb017 (diff) | |
parent | f76b240206156f1d57869cc60264a128d6b6ed2f (diff) |
Merge tag 'asoc-v4.2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: A couple more updates for v4.2
These were sitting on my laptop.
-rw-r--r-- | sound/soc/codecs/arizona.c | 27 | ||||
-rw-r--r-- | sound/soc/codecs/arizona.h | 2 | ||||
-rw-r--r-- | sound/soc/codecs/wm2200.c | 2 | ||||
-rw-r--r-- | sound/soc/codecs/wm5102.c | 5 | ||||
-rw-r--r-- | sound/soc/codecs/wm5110.c | 6 | ||||
-rw-r--r-- | sound/soc/codecs/wm_adsp.c | 52 | ||||
-rw-r--r-- | sound/soc/codecs/wm_adsp.h | 2 | ||||
-rw-r--r-- | sound/soc/sh/rcar/rsrc-card.c | 2 |
8 files changed, 48 insertions, 50 deletions
diff --git a/sound/soc/codecs/arizona.c b/sound/soc/codecs/arizona.c index 88f6df21ad95..802e05eae3e9 100644 --- a/sound/soc/codecs/arizona.c +++ b/sound/soc/codecs/arizona.c | |||
@@ -2286,6 +2286,33 @@ int arizona_set_output_mode(struct snd_soc_codec *codec, int output, bool diff) | |||
2286 | } | 2286 | } |
2287 | EXPORT_SYMBOL_GPL(arizona_set_output_mode); | 2287 | EXPORT_SYMBOL_GPL(arizona_set_output_mode); |
2288 | 2288 | ||
2289 | static const struct soc_enum arizona_adsp2_rate_enum[] = { | ||
2290 | SOC_VALUE_ENUM_SINGLE(ARIZONA_DSP1_CONTROL_1, | ||
2291 | ARIZONA_DSP1_RATE_SHIFT, 0xf, | ||
2292 | ARIZONA_RATE_ENUM_SIZE, | ||
2293 | arizona_rate_text, arizona_rate_val), | ||
2294 | SOC_VALUE_ENUM_SINGLE(ARIZONA_DSP2_CONTROL_1, | ||
2295 | ARIZONA_DSP1_RATE_SHIFT, 0xf, | ||
2296 | ARIZONA_RATE_ENUM_SIZE, | ||
2297 | arizona_rate_text, arizona_rate_val), | ||
2298 | SOC_VALUE_ENUM_SINGLE(ARIZONA_DSP3_CONTROL_1, | ||
2299 | ARIZONA_DSP1_RATE_SHIFT, 0xf, | ||
2300 | ARIZONA_RATE_ENUM_SIZE, | ||
2301 | arizona_rate_text, arizona_rate_val), | ||
2302 | SOC_VALUE_ENUM_SINGLE(ARIZONA_DSP4_CONTROL_1, | ||
2303 | ARIZONA_DSP1_RATE_SHIFT, 0xf, | ||
2304 | ARIZONA_RATE_ENUM_SIZE, | ||
2305 | arizona_rate_text, arizona_rate_val), | ||
2306 | }; | ||
2307 | |||
2308 | const struct snd_kcontrol_new arizona_adsp2_rate_controls[] = { | ||
2309 | SOC_ENUM("DSP1 Rate", arizona_adsp2_rate_enum[0]), | ||
2310 | SOC_ENUM("DSP2 Rate", arizona_adsp2_rate_enum[1]), | ||
2311 | SOC_ENUM("DSP3 Rate", arizona_adsp2_rate_enum[2]), | ||
2312 | SOC_ENUM("DSP4 Rate", arizona_adsp2_rate_enum[3]), | ||
2313 | }; | ||
2314 | EXPORT_SYMBOL_GPL(arizona_adsp2_rate_controls); | ||
2315 | |||
2289 | MODULE_DESCRIPTION("ASoC Wolfson Arizona class device support"); | 2316 | MODULE_DESCRIPTION("ASoC Wolfson Arizona class device support"); |
2290 | MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>"); | 2317 | MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>"); |
2291 | MODULE_LICENSE("GPL"); | 2318 | MODULE_LICENSE("GPL"); |
diff --git a/sound/soc/codecs/arizona.h b/sound/soc/codecs/arizona.h index 84e119a56515..43deb0462309 100644 --- a/sound/soc/codecs/arizona.h +++ b/sound/soc/codecs/arizona.h | |||
@@ -217,6 +217,8 @@ extern const struct soc_enum arizona_ng_hold; | |||
217 | extern const struct soc_enum arizona_in_hpf_cut_enum; | 217 | extern const struct soc_enum arizona_in_hpf_cut_enum; |
218 | extern const struct soc_enum arizona_in_dmic_osr[]; | 218 | extern const struct soc_enum arizona_in_dmic_osr[]; |
219 | 219 | ||
220 | extern const struct snd_kcontrol_new arizona_adsp2_rate_controls[]; | ||
221 | |||
220 | extern int arizona_in_ev(struct snd_soc_dapm_widget *w, | 222 | extern int arizona_in_ev(struct snd_soc_dapm_widget *w, |
221 | struct snd_kcontrol *kcontrol, | 223 | struct snd_kcontrol *kcontrol, |
222 | int event); | 224 | int event); |
diff --git a/sound/soc/codecs/wm2200.c b/sound/soc/codecs/wm2200.c index 5a9da28f4f33..c83083285e53 100644 --- a/sound/soc/codecs/wm2200.c +++ b/sound/soc/codecs/wm2200.c | |||
@@ -1555,7 +1555,7 @@ static int wm2200_probe(struct snd_soc_codec *codec) | |||
1555 | 1555 | ||
1556 | wm2200->codec = codec; | 1556 | wm2200->codec = codec; |
1557 | 1557 | ||
1558 | ret = snd_soc_add_codec_controls(codec, wm_adsp1_fw_controls, 2); | 1558 | ret = snd_soc_add_codec_controls(codec, wm_adsp_fw_controls, 2); |
1559 | if (ret != 0) | 1559 | if (ret != 0) |
1560 | return ret; | 1560 | return ret; |
1561 | 1561 | ||
diff --git a/sound/soc/codecs/wm5102.c b/sound/soc/codecs/wm5102.c index c5ec519d34be..d097f09e50f2 100644 --- a/sound/soc/codecs/wm5102.c +++ b/sound/soc/codecs/wm5102.c | |||
@@ -1880,6 +1880,11 @@ static int wm5102_codec_probe(struct snd_soc_codec *codec) | |||
1880 | if (ret) | 1880 | if (ret) |
1881 | return ret; | 1881 | return ret; |
1882 | 1882 | ||
1883 | ret = snd_soc_add_codec_controls(codec, | ||
1884 | arizona_adsp2_rate_controls, 1); | ||
1885 | if (ret) | ||
1886 | return ret; | ||
1887 | |||
1883 | arizona_init_spk(codec); | 1888 | arizona_init_spk(codec); |
1884 | arizona_init_gpio(codec); | 1889 | arizona_init_gpio(codec); |
1885 | 1890 | ||
diff --git a/sound/soc/codecs/wm5110.c b/sound/soc/codecs/wm5110.c index 5f032a37b61f..709fcc6169d8 100644 --- a/sound/soc/codecs/wm5110.c +++ b/sound/soc/codecs/wm5110.c | |||
@@ -1614,6 +1614,12 @@ static int wm5110_codec_probe(struct snd_soc_codec *codec) | |||
1614 | return ret; | 1614 | return ret; |
1615 | } | 1615 | } |
1616 | 1616 | ||
1617 | ret = snd_soc_add_codec_controls(codec, | ||
1618 | arizona_adsp2_rate_controls, | ||
1619 | WM5110_NUM_ADSP); | ||
1620 | if (ret) | ||
1621 | return ret; | ||
1622 | |||
1617 | snd_soc_dapm_disable_pin(dapm, "HAPTICS"); | 1623 | snd_soc_dapm_disable_pin(dapm, "HAPTICS"); |
1618 | 1624 | ||
1619 | return 0; | 1625 | return 0; |
diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c index f9f90b0f5db4..0bb415a28723 100644 --- a/sound/soc/codecs/wm_adsp.c +++ b/sound/soc/codecs/wm_adsp.c | |||
@@ -458,57 +458,17 @@ static const struct soc_enum wm_adsp_fw_enum[] = { | |||
458 | SOC_ENUM_SINGLE(0, 3, ARRAY_SIZE(wm_adsp_fw_text), wm_adsp_fw_text), | 458 | SOC_ENUM_SINGLE(0, 3, ARRAY_SIZE(wm_adsp_fw_text), wm_adsp_fw_text), |
459 | }; | 459 | }; |
460 | 460 | ||
461 | const struct snd_kcontrol_new wm_adsp1_fw_controls[] = { | 461 | const struct snd_kcontrol_new wm_adsp_fw_controls[] = { |
462 | SOC_ENUM_EXT("DSP1 Firmware", wm_adsp_fw_enum[0], | 462 | SOC_ENUM_EXT("DSP1 Firmware", wm_adsp_fw_enum[0], |
463 | wm_adsp_fw_get, wm_adsp_fw_put), | 463 | wm_adsp_fw_get, wm_adsp_fw_put), |
464 | SOC_ENUM_EXT("DSP2 Firmware", wm_adsp_fw_enum[1], | 464 | SOC_ENUM_EXT("DSP2 Firmware", wm_adsp_fw_enum[1], |
465 | wm_adsp_fw_get, wm_adsp_fw_put), | 465 | wm_adsp_fw_get, wm_adsp_fw_put), |
466 | SOC_ENUM_EXT("DSP3 Firmware", wm_adsp_fw_enum[2], | 466 | SOC_ENUM_EXT("DSP3 Firmware", wm_adsp_fw_enum[2], |
467 | wm_adsp_fw_get, wm_adsp_fw_put), | 467 | wm_adsp_fw_get, wm_adsp_fw_put), |
468 | SOC_ENUM_EXT("DSP4 Firmware", wm_adsp_fw_enum[3], | ||
469 | wm_adsp_fw_get, wm_adsp_fw_put), | ||
468 | }; | 470 | }; |
469 | EXPORT_SYMBOL_GPL(wm_adsp1_fw_controls); | 471 | EXPORT_SYMBOL_GPL(wm_adsp_fw_controls); |
470 | |||
471 | static const struct soc_enum wm_adsp2_rate_enum[] = { | ||
472 | SOC_VALUE_ENUM_SINGLE(ARIZONA_DSP1_CONTROL_1, | ||
473 | ARIZONA_DSP1_RATE_SHIFT, 0xf, | ||
474 | ARIZONA_RATE_ENUM_SIZE, | ||
475 | arizona_rate_text, arizona_rate_val), | ||
476 | SOC_VALUE_ENUM_SINGLE(ARIZONA_DSP2_CONTROL_1, | ||
477 | ARIZONA_DSP1_RATE_SHIFT, 0xf, | ||
478 | ARIZONA_RATE_ENUM_SIZE, | ||
479 | arizona_rate_text, arizona_rate_val), | ||
480 | SOC_VALUE_ENUM_SINGLE(ARIZONA_DSP3_CONTROL_1, | ||
481 | ARIZONA_DSP1_RATE_SHIFT, 0xf, | ||
482 | ARIZONA_RATE_ENUM_SIZE, | ||
483 | arizona_rate_text, arizona_rate_val), | ||
484 | SOC_VALUE_ENUM_SINGLE(ARIZONA_DSP4_CONTROL_1, | ||
485 | ARIZONA_DSP1_RATE_SHIFT, 0xf, | ||
486 | ARIZONA_RATE_ENUM_SIZE, | ||
487 | arizona_rate_text, arizona_rate_val), | ||
488 | }; | ||
489 | |||
490 | static const struct snd_kcontrol_new wm_adsp2_fw_controls[4][2] = { | ||
491 | { | ||
492 | SOC_ENUM_EXT("DSP1 Firmware", wm_adsp_fw_enum[0], | ||
493 | wm_adsp_fw_get, wm_adsp_fw_put), | ||
494 | SOC_ENUM("DSP1 Rate", wm_adsp2_rate_enum[0]), | ||
495 | }, | ||
496 | { | ||
497 | SOC_ENUM_EXT("DSP2 Firmware", wm_adsp_fw_enum[1], | ||
498 | wm_adsp_fw_get, wm_adsp_fw_put), | ||
499 | SOC_ENUM("DSP2 Rate", wm_adsp2_rate_enum[1]), | ||
500 | }, | ||
501 | { | ||
502 | SOC_ENUM_EXT("DSP3 Firmware", wm_adsp_fw_enum[2], | ||
503 | wm_adsp_fw_get, wm_adsp_fw_put), | ||
504 | SOC_ENUM("DSP3 Rate", wm_adsp2_rate_enum[2]), | ||
505 | }, | ||
506 | { | ||
507 | SOC_ENUM_EXT("DSP4 Firmware", wm_adsp_fw_enum[3], | ||
508 | wm_adsp_fw_get, wm_adsp_fw_put), | ||
509 | SOC_ENUM("DSP4 Rate", wm_adsp2_rate_enum[3]), | ||
510 | }, | ||
511 | }; | ||
512 | 472 | ||
513 | static struct wm_adsp_region const *wm_adsp_find_region(struct wm_adsp *dsp, | 473 | static struct wm_adsp_region const *wm_adsp_find_region(struct wm_adsp *dsp, |
514 | int type) | 474 | int type) |
@@ -2125,8 +2085,8 @@ int wm_adsp2_codec_probe(struct wm_adsp *dsp, struct snd_soc_codec *codec) | |||
2125 | wm_adsp2_init_debugfs(dsp, codec); | 2085 | wm_adsp2_init_debugfs(dsp, codec); |
2126 | 2086 | ||
2127 | return snd_soc_add_codec_controls(codec, | 2087 | return snd_soc_add_codec_controls(codec, |
2128 | wm_adsp2_fw_controls[dsp->num - 1], | 2088 | &wm_adsp_fw_controls[dsp->num - 1], |
2129 | ARRAY_SIZE(wm_adsp2_fw_controls[0])); | 2089 | 1); |
2130 | } | 2090 | } |
2131 | EXPORT_SYMBOL_GPL(wm_adsp2_codec_probe); | 2091 | EXPORT_SYMBOL_GPL(wm_adsp2_codec_probe); |
2132 | 2092 | ||
diff --git a/sound/soc/codecs/wm_adsp.h b/sound/soc/codecs/wm_adsp.h index 5042cbd39e54..579a6350fb01 100644 --- a/sound/soc/codecs/wm_adsp.h +++ b/sound/soc/codecs/wm_adsp.h | |||
@@ -83,7 +83,7 @@ struct wm_adsp { | |||
83 | #define WM_ADSP2(wname, num) \ | 83 | #define WM_ADSP2(wname, num) \ |
84 | WM_ADSP2_E(wname, num, wm_adsp2_early_event) | 84 | WM_ADSP2_E(wname, num, wm_adsp2_early_event) |
85 | 85 | ||
86 | extern const struct snd_kcontrol_new wm_adsp1_fw_controls[]; | 86 | extern const struct snd_kcontrol_new wm_adsp_fw_controls[]; |
87 | 87 | ||
88 | int wm_adsp1_init(struct wm_adsp *dsp); | 88 | int wm_adsp1_init(struct wm_adsp *dsp); |
89 | int wm_adsp2_init(struct wm_adsp *dsp); | 89 | int wm_adsp2_init(struct wm_adsp *dsp); |
diff --git a/sound/soc/sh/rcar/rsrc-card.c b/sound/soc/sh/rcar/rsrc-card.c index 8caca2e180c3..84e935711e29 100644 --- a/sound/soc/sh/rcar/rsrc-card.c +++ b/sound/soc/sh/rcar/rsrc-card.c | |||
@@ -75,8 +75,6 @@ static int rsrc_card_startup(struct snd_pcm_substream *substream) | |||
75 | struct rsrc_card_priv *priv = snd_soc_card_get_drvdata(rtd->card); | 75 | struct rsrc_card_priv *priv = snd_soc_card_get_drvdata(rtd->card); |
76 | struct rsrc_card_dai *dai_props = | 76 | struct rsrc_card_dai *dai_props = |
77 | rsrc_priv_to_props(priv, rtd - rtd->card->rtd); | 77 | rsrc_priv_to_props(priv, rtd - rtd->card->rtd); |
78 | int ret; | ||
79 | |||
80 | 78 | ||
81 | return clk_prepare_enable(dai_props->clk); | 79 | return clk_prepare_enable(dai_props->clk); |
82 | } | 80 | } |