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;
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;
dais {
dai0 {
codec-name = "hdmi-i2s";
- cpu-dai-name = "rockchip-i2s.1";
+ cpu-dai-name = "rockchip-i2s.0";
format = "i2s";
//continuous-clock;
//bitclock-inversion;
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 = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
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];
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*/
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;
}