aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/tlv320dac33.c23
1 files changed, 7 insertions, 16 deletions
diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c
index 43ee3b1c757e..3f4920d5456d 100644
--- a/sound/soc/codecs/tlv320dac33.c
+++ b/sound/soc/codecs/tlv320dac33.c
@@ -627,18 +627,6 @@ static const struct snd_soc_dapm_route audio_map[] = {
627 {"RIGHT_LO", NULL, "Codec Power"}, 627 {"RIGHT_LO", NULL, "Codec Power"},
628}; 628};
629 629
630static int dac33_add_widgets(struct snd_soc_codec *codec)
631{
632 struct snd_soc_dapm_context *dapm = &codec->dapm;
633
634 snd_soc_dapm_new_controls(dapm, dac33_dapm_widgets,
635 ARRAY_SIZE(dac33_dapm_widgets));
636 /* set up audio path interconnects */
637 snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
638
639 return 0;
640}
641
642static int dac33_set_bias_level(struct snd_soc_codec *codec, 630static int dac33_set_bias_level(struct snd_soc_codec *codec,
643 enum snd_soc_bias_level level) 631 enum snd_soc_bias_level level)
644{ 632{
@@ -1451,15 +1439,11 @@ static int dac33_soc_probe(struct snd_soc_codec *codec)
1451 } 1439 }
1452 } 1440 }
1453 1441
1454 snd_soc_add_controls(codec, dac33_snd_controls,
1455 ARRAY_SIZE(dac33_snd_controls));
1456 /* Only add the FIFO controls, if we have valid IRQ number */ 1442 /* Only add the FIFO controls, if we have valid IRQ number */
1457 if (dac33->irq >= 0) 1443 if (dac33->irq >= 0)
1458 snd_soc_add_controls(codec, dac33_mode_snd_controls, 1444 snd_soc_add_controls(codec, dac33_mode_snd_controls,
1459 ARRAY_SIZE(dac33_mode_snd_controls)); 1445 ARRAY_SIZE(dac33_mode_snd_controls));
1460 1446
1461 dac33_add_widgets(codec);
1462
1463err_power: 1447err_power:
1464 return ret; 1448 return ret;
1465} 1449}
@@ -1502,6 +1486,13 @@ static struct snd_soc_codec_driver soc_codec_dev_tlv320dac33 = {
1502 .remove = dac33_soc_remove, 1486 .remove = dac33_soc_remove,
1503 .suspend = dac33_soc_suspend, 1487 .suspend = dac33_soc_suspend,
1504 .resume = dac33_soc_resume, 1488 .resume = dac33_soc_resume,
1489
1490 .controls = dac33_snd_controls,
1491 .num_controls = ARRAY_SIZE(dac33_snd_controls),
1492 .dapm_widgets = dac33_dapm_widgets,
1493 .num_dapm_widgets = ARRAY_SIZE(dac33_dapm_widgets),
1494 .dapm_routes = audio_map,
1495 .num_dapm_routes = ARRAY_SIZE(audio_map),
1505}; 1496};
1506 1497
1507#define DAC33_RATES (SNDRV_PCM_RATE_44100 | \ 1498#define DAC33_RATES (SNDRV_PCM_RATE_44100 | \