[alsa-devel] [PATCH 1/3] ASoC: omap-mcbsp: Check mcbsp->id instead of cpu_dai->id when adding ST controls

Peter Ujfalusi peter.ujfalusi at ti.com
Tue Aug 21 16:42:01 CEST 2012


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 at ti.com>
---
 sound/soc/omap/omap-mcbsp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c
index d6de066..84a3132 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,
-- 
1.7.8.6



More information about the Alsa-devel mailing list