diff options
author | Sebastian Reichel <sre@kernel.org> | 2014-04-28 10:07:23 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-05-01 13:54:34 -0400 |
commit | 0a17a37046dbd55204b00fee6e270c8008ace56b (patch) | |
tree | 88187b56d77cb8a368de9f5769ff7af44e68d421 /sound/soc/omap | |
parent | a7d52028551b8be6eaeac93ade8fccba9783c682 (diff) |
ASoC: omap: rx51: omap_mcbsp_st_add_controls: add id parameter
This is a preparation for DT based booting where the McBSP id
is set to -1 for all McBSP instances.
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/omap')
-rw-r--r-- | sound/soc/omap/omap-mcbsp.c | 5 | ||||
-rw-r--r-- | sound/soc/omap/omap-mcbsp.h | 2 | ||||
-rw-r--r-- | sound/soc/omap/rx51.c | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c index af2764adf252..71d226626f7c 100644 --- a/sound/soc/omap/omap-mcbsp.c +++ b/sound/soc/omap/omap-mcbsp.c | |||
@@ -693,7 +693,7 @@ OMAP_MCBSP_SOC_SINGLE_S16_EXT("McBSP" #port " Sidetone Channel 1 Volume", \ | |||
693 | OMAP_MCBSP_ST_CONTROLS(2); | 693 | OMAP_MCBSP_ST_CONTROLS(2); |
694 | OMAP_MCBSP_ST_CONTROLS(3); | 694 | OMAP_MCBSP_ST_CONTROLS(3); |
695 | 695 | ||
696 | int omap_mcbsp_st_add_controls(struct snd_soc_pcm_runtime *rtd) | 696 | int omap_mcbsp_st_add_controls(struct snd_soc_pcm_runtime *rtd, int port_id) |
697 | { | 697 | { |
698 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; | 698 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; |
699 | struct omap_mcbsp *mcbsp = snd_soc_dai_get_drvdata(cpu_dai); | 699 | struct omap_mcbsp *mcbsp = snd_soc_dai_get_drvdata(cpu_dai); |
@@ -703,7 +703,7 @@ int omap_mcbsp_st_add_controls(struct snd_soc_pcm_runtime *rtd) | |||
703 | return 0; | 703 | return 0; |
704 | } | 704 | } |
705 | 705 | ||
706 | switch (mcbsp->id) { | 706 | switch (port_id) { |
707 | case 2: /* McBSP 2 */ | 707 | case 2: /* McBSP 2 */ |
708 | return snd_soc_add_dai_controls(cpu_dai, | 708 | return snd_soc_add_dai_controls(cpu_dai, |
709 | omap_mcbsp2_st_controls, | 709 | omap_mcbsp2_st_controls, |
@@ -713,6 +713,7 @@ int omap_mcbsp_st_add_controls(struct snd_soc_pcm_runtime *rtd) | |||
713 | omap_mcbsp3_st_controls, | 713 | omap_mcbsp3_st_controls, |
714 | ARRAY_SIZE(omap_mcbsp3_st_controls)); | 714 | ARRAY_SIZE(omap_mcbsp3_st_controls)); |
715 | default: | 715 | default: |
716 | dev_err(mcbsp->dev, "Port %d not supported\n", port_id); | ||
716 | break; | 717 | break; |
717 | } | 718 | } |
718 | 719 | ||
diff --git a/sound/soc/omap/omap-mcbsp.h b/sound/soc/omap/omap-mcbsp.h index ba8386a0d8dc..2e3369c27be3 100644 --- a/sound/soc/omap/omap-mcbsp.h +++ b/sound/soc/omap/omap-mcbsp.h | |||
@@ -39,6 +39,6 @@ enum omap_mcbsp_div { | |||
39 | OMAP_MCBSP_CLKGDV, /* Sample rate generator divider */ | 39 | OMAP_MCBSP_CLKGDV, /* Sample rate generator divider */ |
40 | }; | 40 | }; |
41 | 41 | ||
42 | int omap_mcbsp_st_add_controls(struct snd_soc_pcm_runtime *rtd); | 42 | int omap_mcbsp_st_add_controls(struct snd_soc_pcm_runtime *rtd, int port_id); |
43 | 43 | ||
44 | #endif | 44 | #endif |
diff --git a/sound/soc/omap/rx51.c b/sound/soc/omap/rx51.c index bbe3a66e9102..e140b1b2bdf1 100644 --- a/sound/soc/omap/rx51.c +++ b/sound/soc/omap/rx51.c | |||
@@ -297,7 +297,7 @@ static int rx51_aic34_init(struct snd_soc_pcm_runtime *rtd) | |||
297 | return err; | 297 | return err; |
298 | snd_soc_limit_volume(codec, "TPA6130A2 Headphone Playback Volume", 42); | 298 | snd_soc_limit_volume(codec, "TPA6130A2 Headphone Playback Volume", 42); |
299 | 299 | ||
300 | err = omap_mcbsp_st_add_controls(rtd); | 300 | err = omap_mcbsp_st_add_controls(rtd, 2); |
301 | if (err < 0) | 301 | if (err < 0) |
302 | return err; | 302 | return err; |
303 | 303 | ||