From 28739dfcffaad629b28cbab947193b259f745ea9 Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Wed, 22 Aug 2012 13:11:40 +0300 Subject: [PATCH] ASoC: omap-mcbsp: Check mcbsp->id instead of cpu_dai->id when adding ST controls 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 Acked-by: Jarkko Nikula Signed-off-by: Mark Brown --- sound/soc/omap/omap-mcbsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c index 2e1750e..20d30c9 100644 --- a/sound/soc/omap/omap-mcbsp.c +++ b/sound/soc/omap/omap-mcbsp.c @@ -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, -- 2.7.4