mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
Merge remote-tracking branch 'asoc/topic/rockchip' into asoc-next
This commit is contained in:
commit
bc47d183c0
@ -368,7 +368,8 @@ static const struct snd_soc_dai_link rockchip_dais[] = {
|
||||
[DAILINK_RT5514_DSP] = {
|
||||
.name = "RT5514 DSP",
|
||||
.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,
|
||||
if (index < 0)
|
||||
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) {
|
||||
dev_err(dev, "Missing 'rockchip,cpu' for %s\n",
|
||||
rockchip_dais[index].name);
|
||||
@ -539,7 +551,8 @@ static int rockchip_sound_of_parse_dais(struct device *dev,
|
||||
dai = &card->dai_link[card->num_links++];
|
||||
*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->cpu_of_node = np_cpu;
|
||||
|
||||
|
@ -328,6 +328,7 @@ static int rockchip_i2s_hw_params(struct snd_pcm_substream *substream,
|
||||
val |= I2S_CHN_4;
|
||||
break;
|
||||
case 2:
|
||||
case 1:
|
||||
val |= I2S_CHN_2;
|
||||
break;
|
||||
default:
|
||||
@ -460,7 +461,7 @@ static struct snd_soc_dai_driver rockchip_i2s_dai = {
|
||||
},
|
||||
.capture = {
|
||||
.stream_name = "Capture",
|
||||
.channels_min = 2,
|
||||
.channels_min = 1,
|
||||
.channels_max = 2,
|
||||
.rates = SNDRV_PCM_RATE_8000_192000,
|
||||
.formats = (SNDRV_PCM_FMTBIT_S8 |
|
||||
@ -660,7 +661,7 @@ static int rockchip_i2s_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user