diff options
Diffstat (limited to 'sound/soc/codecs/tlv320aic23.c')
-rw-r--r-- | sound/soc/codecs/tlv320aic23.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/sound/soc/codecs/tlv320aic23.c b/sound/soc/codecs/tlv320aic23.c index 54a30ef0ec8b..33bb52f3f683 100644 --- a/sound/soc/codecs/tlv320aic23.c +++ b/sound/soc/codecs/tlv320aic23.c | |||
@@ -212,7 +212,7 @@ static const struct snd_soc_dapm_widget tlv320aic23_dapm_widgets[] = { | |||
212 | SND_SOC_DAPM_INPUT("MICIN"), | 212 | SND_SOC_DAPM_INPUT("MICIN"), |
213 | }; | 213 | }; |
214 | 214 | ||
215 | static const struct snd_soc_dapm_route intercon[] = { | 215 | static const struct snd_soc_dapm_route tlv320aic23_intercon[] = { |
216 | /* Output Mixer */ | 216 | /* Output Mixer */ |
217 | {"Output Mixer", "Line Bypass Switch", "Line Input"}, | 217 | {"Output Mixer", "Line Bypass Switch", "Line Input"}, |
218 | {"Output Mixer", "Playback Switch", "DAC"}, | 218 | {"Output Mixer", "Playback Switch", "DAC"}, |
@@ -388,18 +388,6 @@ static int set_sample_rate_control(struct snd_soc_codec *codec, int mclk, | |||
388 | return 0; | 388 | return 0; |
389 | } | 389 | } |
390 | 390 | ||
391 | static int tlv320aic23_add_widgets(struct snd_soc_codec *codec) | ||
392 | { | ||
393 | struct snd_soc_dapm_context *dapm = &codec->dapm; | ||
394 | |||
395 | snd_soc_dapm_new_controls(dapm, tlv320aic23_dapm_widgets, | ||
396 | ARRAY_SIZE(tlv320aic23_dapm_widgets)); | ||
397 | /* set up audio path interconnects */ | ||
398 | snd_soc_dapm_add_routes(dapm, intercon, ARRAY_SIZE(intercon)); | ||
399 | |||
400 | return 0; | ||
401 | } | ||
402 | |||
403 | static int tlv320aic23_hw_params(struct snd_pcm_substream *substream, | 391 | static int tlv320aic23_hw_params(struct snd_pcm_substream *substream, |
404 | struct snd_pcm_hw_params *params, | 392 | struct snd_pcm_hw_params *params, |
405 | struct snd_soc_dai *dai) | 393 | struct snd_soc_dai *dai) |
@@ -676,7 +664,6 @@ static int tlv320aic23_probe(struct snd_soc_codec *codec) | |||
676 | 664 | ||
677 | snd_soc_add_controls(codec, tlv320aic23_snd_controls, | 665 | snd_soc_add_controls(codec, tlv320aic23_snd_controls, |
678 | ARRAY_SIZE(tlv320aic23_snd_controls)); | 666 | ARRAY_SIZE(tlv320aic23_snd_controls)); |
679 | tlv320aic23_add_widgets(codec); | ||
680 | 667 | ||
681 | return 0; | 668 | return 0; |
682 | } | 669 | } |
@@ -698,6 +685,10 @@ static struct snd_soc_codec_driver soc_codec_dev_tlv320aic23 = { | |||
698 | .read = tlv320aic23_read_reg_cache, | 685 | .read = tlv320aic23_read_reg_cache, |
699 | .write = tlv320aic23_write, | 686 | .write = tlv320aic23_write, |
700 | .set_bias_level = tlv320aic23_set_bias_level, | 687 | .set_bias_level = tlv320aic23_set_bias_level, |
688 | .dapm_widgets = tlv320aic23_dapm_widgets, | ||
689 | .num_dapm_widgets = ARRAY_SIZE(tlv320aic23_dapm_widgets), | ||
690 | .dapm_routes = tlv320aic23_intercon, | ||
691 | .num_dapm_routes = ARRAY_SIZE(tlv320aic23_intercon), | ||
701 | }; | 692 | }; |
702 | 693 | ||
703 | #if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) | 694 | #if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) |