Commit bc47d183 authored by Mark Brown's avatar Mark Brown

Merge remote-tracking branch 'asoc/topic/rockchip' into asoc-next

parents ef179a74 fde7f9db
...@@ -368,7 +368,8 @@ static const struct snd_soc_dai_link rockchip_dais[] = { ...@@ -368,7 +368,8 @@ static const struct snd_soc_dai_link rockchip_dais[] = {
[DAILINK_RT5514_DSP] = { [DAILINK_RT5514_DSP] = {
.name = "RT5514 DSP", .name = "RT5514 DSP",
.stream_name = "Wake on Voice", .stream_name = "Wake on Voice",
.codec_dai_name = "rt5514-dsp-cpu-dai", .codec_name = "snd-soc-dummy",
.codec_dai_name = "snd-soc-dummy-dai",
}, },
}; };
...@@ -529,7 +530,18 @@ static int rockchip_sound_of_parse_dais(struct device *dev, ...@@ -529,7 +530,18 @@ static int rockchip_sound_of_parse_dais(struct device *dev,
if (index < 0) if (index < 0)
continue; continue;
np_cpu = (index == DAILINK_CDNDP) ? np_cpu1 : np_cpu0; switch (index) {
case DAILINK_CDNDP:
np_cpu = np_cpu1;
break;
case DAILINK_RT5514_DSP:
np_cpu = np_codec;
break;
default:
np_cpu = np_cpu0;
break;
}
if (!np_cpu) { if (!np_cpu) {
dev_err(dev, "Missing 'rockchip,cpu' for %s\n", dev_err(dev, "Missing 'rockchip,cpu' for %s\n",
rockchip_dais[index].name); rockchip_dais[index].name);
...@@ -539,7 +551,8 @@ static int rockchip_sound_of_parse_dais(struct device *dev, ...@@ -539,7 +551,8 @@ static int rockchip_sound_of_parse_dais(struct device *dev,
dai = &card->dai_link[card->num_links++]; dai = &card->dai_link[card->num_links++];
*dai = rockchip_dais[index]; *dai = rockchip_dais[index];
dai->codec_of_node = np_codec; if (!dai->codec_name)
dai->codec_of_node = np_codec;
dai->platform_of_node = np_cpu; dai->platform_of_node = np_cpu;
dai->cpu_of_node = np_cpu; dai->cpu_of_node = np_cpu;
......
...@@ -328,6 +328,7 @@ static int rockchip_i2s_hw_params(struct snd_pcm_substream *substream, ...@@ -328,6 +328,7 @@ static int rockchip_i2s_hw_params(struct snd_pcm_substream *substream,
val |= I2S_CHN_4; val |= I2S_CHN_4;
break; break;
case 2: case 2:
case 1:
val |= I2S_CHN_2; val |= I2S_CHN_2;
break; break;
default: default:
...@@ -460,7 +461,7 @@ static struct snd_soc_dai_driver rockchip_i2s_dai = { ...@@ -460,7 +461,7 @@ static struct snd_soc_dai_driver rockchip_i2s_dai = {
}, },
.capture = { .capture = {
.stream_name = "Capture", .stream_name = "Capture",
.channels_min = 2, .channels_min = 1,
.channels_max = 2, .channels_max = 2,
.rates = SNDRV_PCM_RATE_8000_192000, .rates = SNDRV_PCM_RATE_8000_192000,
.formats = (SNDRV_PCM_FMTBIT_S8 | .formats = (SNDRV_PCM_FMTBIT_S8 |
...@@ -660,7 +661,7 @@ static int rockchip_i2s_probe(struct platform_device *pdev) ...@@ -660,7 +661,7 @@ static int rockchip_i2s_probe(struct platform_device *pdev)
} }
if (!of_property_read_u32(node, "rockchip,capture-channels", &val)) { if (!of_property_read_u32(node, "rockchip,capture-channels", &val)) {
if (val >= 2 && val <= 8) if (val >= 1 && val <= 8)
soc_dai->capture.channels_max = val; soc_dai->capture.channels_max = val;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment