]> rtime.felk.cvut.cz Git - can-eth-gw-linux.git/commitdiff
ASoC: omap-mcbsp: Check mcbsp->id instead of cpu_dai->id when adding ST controls
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Wed, 22 Aug 2012 10:11:40 +0000 (13:11 +0300)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Sat, 25 Aug 2012 20:30:11 +0000 (13:30 -0700)
In ddevice tree booted kernel all device have unique name and their device
id is set to 0.
Use the mcbsp->id for checking to decide which control set we should add
for McBSP sidetone handling.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/omap/omap-mcbsp.c

index 2e1750e2ab31b9950900fae3519a134e10f02d62..20d30c9ae573a43a8155b77ea66449c576a2fa92 100644 (file)
@@ -722,7 +722,7 @@ int omap_mcbsp_st_add_controls(struct snd_soc_pcm_runtime *rtd)
        if (!mcbsp->st_data)
                return -ENODEV;
 
-       switch (cpu_dai->id) {
+       switch (mcbsp->id) {
        case 2: /* McBSP 2 */
                return snd_soc_add_dai_controls(cpu_dai,
                                        omap_mcbsp2_st_controls,