[alsa-devel] [PATCH 1/2] ASoC: Pay attention to driver supplied DAI IDs

Mark Brown broonie at opensource.wolfsonmicro.com
Tue Oct 12 16:57:55 CEST 2010


The driver can specify a DAI ID number so use that.

Signed-off-by: Mark Brown <broonie at opensource.wolfsonmicro.com>
---
 sound/soc/soc-core.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 4f6ea8c..c20cf7f 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -3015,7 +3015,10 @@ int snd_soc_register_dais(struct device *dev,
 		}
 
 		dai->dev = dev;
-		dai->id = i;
+		if (dai->driver->id)
+			dai->id = dai->driver->id;
+		else
+			dai->id = i;
 		dai->driver = &dai_drv[i];
 		if (!dai->driver->ops)
 			dai->driver->ops = &null_dai_ops;
-- 
1.7.1



More information about the Alsa-devel mailing list