[PATCH 0/1] Add support for primary mi2s on SM8250
This patch adds support for the primary mi2s interface on devices using SM8250 audio drivers. Tested on SM7150 (xiaomi-davinci). SM7150 sound is close to SM8250 and we intend to use it as a fallback in the future.
To: Srinivas Kandagatla srinivas.kandagatla@linaro.org To: Liam Girdwood lgirdwood@gmail.com To: Mark Brown broonie@kernel.org To: Jaroslav Kysela perex@perex.cz To: Takashi Iwai tiwai@suse.com Cc: alsa-devel@alsa-project.org Cc: linux-arm-msm@vger.kernel.org Cc: linux-sound@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux@mainlining.org
Jens Reidel (1): ASoC: qcom: sm8250: enable primary mi2s
sound/soc/qcom/sm8250.c | 8 ++++++++ 1 file changed, 8 insertions(+)
When using primary mi2s on sm8250-compatible SoCs, the correct clock needs to get enabled to be able to use the mi2s interface.
Signed-off-by: Jens Reidel adrian@travitia.xyz --- sound/soc/qcom/sm8250.c | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/sound/soc/qcom/sm8250.c b/sound/soc/qcom/sm8250.c index a15dafb99b33..274bab28209a 100644 --- a/sound/soc/qcom/sm8250.c +++ b/sound/soc/qcom/sm8250.c @@ -55,6 +55,14 @@ static int sm8250_snd_startup(struct snd_pcm_substream *substream) struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0);
switch (cpu_dai->id) { + case PRIMARY_MI2S_RX: + codec_dai_fmt |= SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_I2S; + snd_soc_dai_set_sysclk(cpu_dai, + Q6AFE_LPASS_CLK_ID_PRI_MI2S_IBIT, + MI2S_BCLK_RATE, SNDRV_PCM_STREAM_PLAYBACK); + snd_soc_dai_set_fmt(cpu_dai, fmt); + snd_soc_dai_set_fmt(codec_dai, codec_dai_fmt); + break; case TERTIARY_MI2S_RX: codec_dai_fmt |= SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_I2S; snd_soc_dai_set_sysclk(cpu_dai,
On 8/26/24 16:49, Jens Reidel wrote:
When using primary mi2s on sm8250-compatible SoCs, the correct clock needs to get enabled to be able to use the mi2s interface.
Signed-off-by: Jens Reidel adrian@travitia.xyz
sound/soc/qcom/sm8250.c | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/sound/soc/qcom/sm8250.c b/sound/soc/qcom/sm8250.c index a15dafb99b33..274bab28209a 100644 --- a/sound/soc/qcom/sm8250.c +++ b/sound/soc/qcom/sm8250.c @@ -55,6 +55,14 @@ static int sm8250_snd_startup(struct snd_pcm_substream *substream) struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0);
switch (cpu_dai->id) {
- case PRIMARY_MI2S_RX:
codec_dai_fmt |= SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_I2S;
snd_soc_dai_set_sysclk(cpu_dai,
Q6AFE_LPASS_CLK_ID_PRI_MI2S_IBIT,
MI2S_BCLK_RATE, SNDRV_PCM_STREAM_PLAYBACK);
snd_soc_dai_set_fmt(cpu_dai, fmt);
snd_soc_dai_set_fmt(codec_dai, codec_dai_fmt);
case TERTIARY_MI2S_RX: codec_dai_fmt |= SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_I2S; snd_soc_dai_set_sysclk(cpu_dai,break;
Thank you. I use sm8250-sndcard on sm7325 and it works for me: https://github.com/mainlining/linux/commit/292a1ac9f093c639363f257e92d313489...
Let the maintainers decide whether it is really fair to add this tag.
Tested-by: Danila Tikhonov danila@jiaxyga.com # sm7325-nothing-spacewar
--- Best wishes, Danila
On Mon, Aug 26, 2024 at 03:49:20PM GMT, Jens Reidel wrote:
When using primary mi2s on sm8250-compatible SoCs, the correct clock needs to get enabled to be able to use the mi2s interface.
Signed-off-by: Jens Reidel adrian@travitia.xyz
sound/soc/qcom/sm8250.c | 8 ++++++++ 1 file changed, 8 insertions(+)
Reviewed-by: Dmitry Baryshkov dmitry.baryshkov@linaro.org
On Mon, Aug 26, 2024 at 03:49:19PM +0200, Jens Reidel wrote:
This patch adds support for the primary mi2s interface on devices using SM8250 audio drivers. Tested on SM7150 (xiaomi-davinci). SM7150 sound is close to SM8250 and we intend to use it as a fallback in the future.
Please don't send cover letters for single patches, if there is anything that needs saying put it in the changelog of the patch or after the --- if it's administrative stuff. This reduces mail volume and ensures that any important information is recorded in the changelog rather than being lost.
On Mon, 26 Aug 2024 15:49:19 +0200, Jens Reidel wrote:
This patch adds support for the primary mi2s interface on devices using SM8250 audio drivers. Tested on SM7150 (xiaomi-davinci). SM7150 sound is close to SM8250 and we intend to use it as a fallback in the future.
To: Srinivas Kandagatla srinivas.kandagatla@linaro.org To: Liam Girdwood lgirdwood@gmail.com To: Mark Brown broonie@kernel.org To: Jaroslav Kysela perex@perex.cz To: Takashi Iwai tiwai@suse.com Cc: alsa-devel@alsa-project.org Cc: linux-arm-msm@vger.kernel.org Cc: linux-sound@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux@mainlining.org
[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: qcom: sm8250: enable primary mi2s commit: 851e3a2a4490b03bb8dd0cda1b8b2a78f6a92805
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks, Mark
participants (4)
-
Danila Tikhonov
-
Dmitry Baryshkov
-
Jens Reidel
-
Mark Brown