Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit bc47d183 authored by Mark Brown's avatar Mark Brown
Browse files

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

parents ef179a74 fde7f9db
Loading
Loading
Loading
Loading
+16 −3
Original line number Diff line number Diff line
@@ -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,6 +551,7 @@ static int rockchip_sound_of_parse_dais(struct device *dev,
		dai = &card->dai_link[card->num_links++];
		*dai = rockchip_dais[index];

		if (!dai->codec_name)
			dai->codec_of_node = np_codec;
		dai->platform_of_node = np_cpu;
		dai->cpu_of_node = np_cpu;
+3 −2
Original line number Diff line number Diff line
@@ -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;
	}