From 95ebffb4bf0c7d5ca4b2f50142e4775a94888577 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E9=99=88=E9=87=91=E6=B3=89?= Date: Tue, 2 Jul 2013 16:47:48 +0800 Subject: [PATCH] rk hdmi i2s: add I2S judgement --- sound/soc/rk29/rk_hdmi_i2s.c | 6 +++++- sound/soc/rk29/rk_rk616.c | 8 ++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/sound/soc/rk29/rk_hdmi_i2s.c b/sound/soc/rk29/rk_hdmi_i2s.c index a41c0bd13ea3..6665b2bacf8f 100644 --- a/sound/soc/rk29/rk_hdmi_i2s.c +++ b/sound/soc/rk29/rk_hdmi_i2s.c @@ -82,7 +82,11 @@ static struct snd_soc_dai_link hdmi_i2s_dai = { .stream_name = "HDMI PCM", .codec_name = "hdmi-i2s", .platform_name = "rockchip-audio", +#if defined(CONFIG_SND_RK29_SOC_I2S_8CH) + .cpu_dai_name = "rk29_i2s.0", +#elif defined(CONFIG_SND_RK29_SOC_I2S_2CH) .cpu_dai_name = "rk29_i2s.1", +#endif .codec_dai_name = "rk-hdmi-i2s-hifi", .ops = &hdmi_i2s_hifi_ops, }; @@ -116,7 +120,7 @@ static int __init audio_card_init(void) platform_device_put(hdmi_i2s_device); return ret; } - DBG("Enter::%s----%d 1\n",__FUNCTION__,__LINE__); + hdmi_i2s_snd_device = platform_device_alloc("soc-audio", -3); if (!hdmi_i2s_snd_device) { printk("platform device allocation failed\n"); diff --git a/sound/soc/rk29/rk_rk616.c b/sound/soc/rk29/rk_rk616.c index 2df88e397a78..d28362b63103 100755 --- a/sound/soc/rk29/rk_rk616.c +++ b/sound/soc/rk29/rk_rk616.c @@ -241,7 +241,11 @@ static struct snd_soc_dai_link rk_dai[] = { .stream_name = "RK616 PCM", .codec_name = "rk616-codec.4-0050", .platform_name = "rockchip-audio", +#if defined(CONFIG_SND_RK29_SOC_I2S_8CH) + .cpu_dai_name = "rk29_i2s.0", +#elif defined(CONFIG_SND_RK29_SOC_I2S_2CH) .cpu_dai_name = "rk29_i2s.1", +#endif .codec_dai_name = "rk616-hifi", .init = rk616_init, .ops = &rk616_hifi_ops, @@ -251,7 +255,11 @@ static struct snd_soc_dai_link rk_dai[] = { .stream_name = "RK616 PCM", .codec_name = "rk616-codec.4-0050", .platform_name = "rockchip-audio", +#if defined(CONFIG_SND_RK29_SOC_I2S_8CH) + .cpu_dai_name = "rk29_i2s.0", +#elif defined(CONFIG_SND_RK29_SOC_I2S_2CH) .cpu_dai_name = "rk29_i2s.1", +#endif .codec_dai_name = "rk616-voice", .ops = &rk616_voice_ops, }, -- 2.34.1