From: qjb Date: Wed, 5 Mar 2014 08:42:52 +0000 (+0800) Subject: sound soc-core:codec_name not adapted i2c_name X-Git-Tag: firefly_0821_release~6203 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=392a497fe08883c16f8045bd6d7c3ccc1bd4b4c3;p=firefly-linux-kernel-4.4.55.git sound soc-core:codec_name not adapted i2c_name change i2s id --- diff --git a/arch/arm/boot/dts/rk3188-tb.dts b/arch/arm/boot/dts/rk3188-tb.dts old mode 100644 new mode 100755 index ab9d2a9dbce6..74c4d0a29b57 --- a/arch/arm/boot/dts/rk3188-tb.dts +++ b/arch/arm/boot/dts/rk3188-tb.dts @@ -69,7 +69,7 @@ dais { dai0 { codec-name = "rt5631.0-001a"; - cpu-dai-name = "rockchip-i2s.1"; + cpu-dai-name = "rockchip-i2s.0"; format = "i2s"; //continuous-clock; //bitclock-inversion; @@ -85,7 +85,7 @@ dais { dai0 { codec-name = "rk610_codec.0-0060"; - cpu-dai-name = "rockchip-i2s.1"; + cpu-dai-name = "rockchip-i2s.0"; format = "i2s"; //continuous-clock; //bitclock-inversion; @@ -101,7 +101,7 @@ dais { dai0 { codec-name = "hdmi-i2s"; - cpu-dai-name = "rockchip-i2s.1"; + cpu-dai-name = "rockchip-i2s.0"; format = "i2s"; //continuous-clock; //bitclock-inversion; diff --git a/arch/arm/boot/dts/rk3188.dtsi b/arch/arm/boot/dts/rk3188.dtsi index b1cb283fc93a..812fa29349ef 100755 --- a/arch/arm/boot/dts/rk3188.dtsi +++ b/arch/arm/boot/dts/rk3188.dtsi @@ -465,10 +465,10 @@ pinctrl-0 = <&spdif_tx>; }; - i2s1: rockchip-i2s@0x1011a000 { + i2s0: rockchip-i2s@0x1011a000 { compatible = "rockchip-i2s"; reg = <0x1011a000 0x2000>; - i2s-id = <1>; + i2s-id = <0>; clocks = <&clk_i2s>; clock-names = "i2s_clk"; interrupts = ; diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c old mode 100644 new mode 100755 index d56bbea6e75e..4a63b19d2c78 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -815,6 +815,7 @@ EXPORT_SYMBOL_GPL(snd_soc_resume); static const struct snd_soc_dai_ops null_dai_ops = { }; +#define CODEC_NAME_CMP static int soc_bind_dai_link(struct snd_soc_card *card, int num) { struct snd_soc_dai_link *dai_link = &card->dai_link[num]; @@ -824,6 +825,14 @@ static int soc_bind_dai_link(struct snd_soc_card *card, int num) struct snd_soc_dai *codec_dai, *cpu_dai; const char *platform_name; +#ifdef CODEC_NAME_CMP + char *p_codec_name; + char *p_dai_codec_name; + char tmp_codec_name[50]; + char tmp_dai_codec_name[50]; + p_codec_name = tmp_codec_name; + p_dai_codec_name = tmp_dai_codec_name; +#endif dev_dbg(card->dev, "ASoC: binding %s at idx %d\n", dai_link->name, num); /* Find CPU DAI from registered DAIs*/ @@ -853,7 +862,15 @@ static int soc_bind_dai_link(struct snd_soc_card *card, int num) if (codec->dev->of_node != dai_link->codec_of_node) continue; } else { - if (strcmp(codec->name, dai_link->codec_name)) + #ifdef CODEC_NAME_CMP + strcpy(p_codec_name,codec->name); + strcpy(p_dai_codec_name,dai_link->codec_name); + #endif + if (strcmp(codec->name, dai_link->codec_name) + #ifdef CODEC_NAME_CMP + && strcmp(strsep(&p_codec_name,"."), strsep(&p_dai_codec_name,".")) + #endif + ) continue; }