* [PATCH 0/2] ASoC: SDM845: Update MI2S and TDM configuration @ 2018-11-16 7:41 Rohit kumar 2018-11-16 7:41 ` [PATCH 1/2] ASoC: sdm845: Update slot_width for Quaternary TDM port Rohit kumar 2018-11-16 7:41 ` [PATCH 2/2] ASoC: sdm845: Add support for Secondary MI2S interface Rohit kumar 0 siblings, 2 replies; 7+ messages in thread From: Rohit kumar @ 2018-11-16 7:41 UTC (permalink / raw) To: plai, bgoswami, lgirdwood, broonie, perex, tiwai, alsa-devel, linux-kernel, rohkumar, srinivas.kandagatla Cc: Rohit kumar Update bit clock rate, slot width for TDM and MI2S interfaces. Also add support for secondary MI2S TX interface in SDM845 machine driver. Rohit kumar (2): ASoC: sdm845: Update slot_width for Quaternary TDM port ASoC: sdm845: Add support for Secondary MI2S interface sound/soc/qcom/sdm845.c | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) -- Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] ASoC: sdm845: Update slot_width for Quaternary TDM port 2018-11-16 7:41 [PATCH 0/2] ASoC: SDM845: Update MI2S and TDM configuration Rohit kumar @ 2018-11-16 7:41 ` Rohit kumar 2018-11-21 9:22 ` Srinivas Kandagatla 2018-11-21 13:30 ` Applied "ASoC: sdm845: Update slot_width for Quaternary TDM port" to the asoc tree Mark Brown 2018-11-16 7:41 ` [PATCH 2/2] ASoC: sdm845: Add support for Secondary MI2S interface Rohit kumar 1 sibling, 2 replies; 7+ messages in thread From: Rohit kumar @ 2018-11-16 7:41 UTC (permalink / raw) To: plai, bgoswami, lgirdwood, broonie, perex, tiwai, alsa-devel, linux-kernel, rohkumar, srinivas.kandagatla Cc: Rohit kumar Change slot_width for quaternary TDM port to 16 and update bclk rate for TDM and MI2S interfaces accordingly. Signed-off-by: Rohit kumar <rohitkr@codeaurora.org> --- sound/soc/qcom/sdm845.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sound/soc/qcom/sdm845.c b/sound/soc/qcom/sdm845.c index 8d0cdff..84e6ee7 100644 --- a/sound/soc/qcom/sdm845.c +++ b/sound/soc/qcom/sdm845.c @@ -13,7 +13,8 @@ #define DEFAULT_SAMPLE_RATE_48K 48000 #define DEFAULT_MCLK_RATE 24576000 -#define DEFAULT_BCLK_RATE 12288000 +#define TDM_BCLK_RATE 6144000 +#define MI2S_BCLK_RATE 1536000 struct sdm845_snd_data { struct snd_soc_card *card; @@ -33,7 +34,7 @@ static int sdm845_tdm_snd_hw_params(struct snd_pcm_substream *substream, switch (params_format(params)) { case SNDRV_PCM_FORMAT_S16_LE: - slot_width = 32; + slot_width = 16; break; default: dev_err(rtd->dev, "%s: invalid param format 0x%x\n", @@ -115,7 +116,7 @@ static int sdm845_snd_startup(struct snd_pcm_substream *substream) DEFAULT_MCLK_RATE, SNDRV_PCM_STREAM_PLAYBACK); snd_soc_dai_set_sysclk(cpu_dai, Q6AFE_LPASS_CLK_ID_PRI_MI2S_IBIT, - DEFAULT_BCLK_RATE, SNDRV_PCM_STREAM_PLAYBACK); + MI2S_BCLK_RATE, SNDRV_PCM_STREAM_PLAYBACK); } snd_soc_dai_set_fmt(cpu_dai, fmt); break; @@ -125,7 +126,7 @@ static int sdm845_snd_startup(struct snd_pcm_substream *substream) if (++(data->quat_tdm_clk_count) == 1) { snd_soc_dai_set_sysclk(cpu_dai, Q6AFE_LPASS_CLK_ID_QUAD_TDM_IBIT, - DEFAULT_BCLK_RATE, SNDRV_PCM_STREAM_PLAYBACK); + TDM_BCLK_RATE, SNDRV_PCM_STREAM_PLAYBACK); } break; -- Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project. ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] ASoC: sdm845: Update slot_width for Quaternary TDM port 2018-11-16 7:41 ` [PATCH 1/2] ASoC: sdm845: Update slot_width for Quaternary TDM port Rohit kumar @ 2018-11-21 9:22 ` Srinivas Kandagatla 2018-11-21 13:30 ` Applied "ASoC: sdm845: Update slot_width for Quaternary TDM port" to the asoc tree Mark Brown 1 sibling, 0 replies; 7+ messages in thread From: Srinivas Kandagatla @ 2018-11-21 9:22 UTC (permalink / raw) To: Rohit kumar, plai, bgoswami, lgirdwood, broonie, perex, tiwai, alsa-devel, linux-kernel, rohkumar On 16/11/18 07:41, Rohit kumar wrote: > Change slot_width for quaternary TDM port to 16 and > update bclk rate for TDM and MI2S interfaces > accordingly. > > Signed-off-by: Rohit kumar <rohitkr@codeaurora.org> > --- > sound/soc/qcom/sdm845.c | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> ^ permalink raw reply [flat|nested] 7+ messages in thread
* Applied "ASoC: sdm845: Update slot_width for Quaternary TDM port" to the asoc tree 2018-11-16 7:41 ` [PATCH 1/2] ASoC: sdm845: Update slot_width for Quaternary TDM port Rohit kumar 2018-11-21 9:22 ` Srinivas Kandagatla @ 2018-11-21 13:30 ` Mark Brown 1 sibling, 0 replies; 7+ messages in thread From: Mark Brown @ 2018-11-21 13:30 UTC (permalink / raw) To: Rohit kumar Cc: Srinivas Kandagatla, Mark Brown, plai, bgoswami, lgirdwood, broonie, perex, tiwai, alsa-devel, linux-kernel, rohkumar, srinivas.kandagatla, alsa-devel The patch ASoC: sdm845: Update slot_width for Quaternary TDM port has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 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 From a1849b7dd30a07654b53f3599cc8f028afeb5d9f Mon Sep 17 00:00:00 2001 From: Rohit kumar <rohitkr@codeaurora.org> Date: Fri, 16 Nov 2018 13:11:57 +0530 Subject: [PATCH] ASoC: sdm845: Update slot_width for Quaternary TDM port Change slot_width for quaternary TDM port to 16 and update bclk rate for TDM and MI2S interfaces accordingly. Signed-off-by: Rohit kumar <rohitkr@codeaurora.org> Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org> --- sound/soc/qcom/sdm845.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sound/soc/qcom/sdm845.c b/sound/soc/qcom/sdm845.c index 8d0cdff64377..84e6ee7d78d3 100644 --- a/sound/soc/qcom/sdm845.c +++ b/sound/soc/qcom/sdm845.c @@ -13,7 +13,8 @@ #define DEFAULT_SAMPLE_RATE_48K 48000 #define DEFAULT_MCLK_RATE 24576000 -#define DEFAULT_BCLK_RATE 12288000 +#define TDM_BCLK_RATE 6144000 +#define MI2S_BCLK_RATE 1536000 struct sdm845_snd_data { struct snd_soc_card *card; @@ -33,7 +34,7 @@ static int sdm845_tdm_snd_hw_params(struct snd_pcm_substream *substream, switch (params_format(params)) { case SNDRV_PCM_FORMAT_S16_LE: - slot_width = 32; + slot_width = 16; break; default: dev_err(rtd->dev, "%s: invalid param format 0x%x\n", @@ -115,7 +116,7 @@ static int sdm845_snd_startup(struct snd_pcm_substream *substream) DEFAULT_MCLK_RATE, SNDRV_PCM_STREAM_PLAYBACK); snd_soc_dai_set_sysclk(cpu_dai, Q6AFE_LPASS_CLK_ID_PRI_MI2S_IBIT, - DEFAULT_BCLK_RATE, SNDRV_PCM_STREAM_PLAYBACK); + MI2S_BCLK_RATE, SNDRV_PCM_STREAM_PLAYBACK); } snd_soc_dai_set_fmt(cpu_dai, fmt); break; @@ -125,7 +126,7 @@ static int sdm845_snd_startup(struct snd_pcm_substream *substream) if (++(data->quat_tdm_clk_count) == 1) { snd_soc_dai_set_sysclk(cpu_dai, Q6AFE_LPASS_CLK_ID_QUAD_TDM_IBIT, - DEFAULT_BCLK_RATE, SNDRV_PCM_STREAM_PLAYBACK); + TDM_BCLK_RATE, SNDRV_PCM_STREAM_PLAYBACK); } break; -- 2.19.0.rc2 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/2] ASoC: sdm845: Add support for Secondary MI2S interface 2018-11-16 7:41 [PATCH 0/2] ASoC: SDM845: Update MI2S and TDM configuration Rohit kumar 2018-11-16 7:41 ` [PATCH 1/2] ASoC: sdm845: Update slot_width for Quaternary TDM port Rohit kumar @ 2018-11-16 7:41 ` Rohit kumar 2018-11-21 9:22 ` Srinivas Kandagatla 2018-11-21 13:30 ` Applied "ASoC: sdm845: Add support for Secondary MI2S interface" to the asoc tree Mark Brown 1 sibling, 2 replies; 7+ messages in thread From: Rohit kumar @ 2018-11-16 7:41 UTC (permalink / raw) To: plai, bgoswami, lgirdwood, broonie, perex, tiwai, alsa-devel, linux-kernel, rohkumar, srinivas.kandagatla Cc: Rohit kumar Add support to configure bit clock for secondary MI2S TX interface. Signed-off-by: Rohit kumar <rohitkr@codeaurora.org> --- sound/soc/qcom/sdm845.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/sound/soc/qcom/sdm845.c b/sound/soc/qcom/sdm845.c index 84e6ee7..58593db 100644 --- a/sound/soc/qcom/sdm845.c +++ b/sound/soc/qcom/sdm845.c @@ -19,6 +19,7 @@ struct sdm845_snd_data { struct snd_soc_card *card; uint32_t pri_mi2s_clk_count; + uint32_t sec_mi2s_clk_count; uint32_t quat_tdm_clk_count; }; @@ -121,6 +122,15 @@ static int sdm845_snd_startup(struct snd_pcm_substream *substream) snd_soc_dai_set_fmt(cpu_dai, fmt); break; + case SECONDARY_MI2S_TX: + if (++(data->sec_mi2s_clk_count) == 1) { + snd_soc_dai_set_sysclk(cpu_dai, + Q6AFE_LPASS_CLK_ID_SEC_MI2S_IBIT, + MI2S_BCLK_RATE, SNDRV_PCM_STREAM_CAPTURE); + } + snd_soc_dai_set_fmt(cpu_dai, fmt); + break; + case QUATERNARY_TDM_RX_0: case QUATERNARY_TDM_TX_0: if (++(data->quat_tdm_clk_count) == 1) { @@ -157,6 +167,14 @@ static void sdm845_snd_shutdown(struct snd_pcm_substream *substream) }; break; + case SECONDARY_MI2S_TX: + if (--(data->sec_mi2s_clk_count) == 0) { + snd_soc_dai_set_sysclk(cpu_dai, + Q6AFE_LPASS_CLK_ID_SEC_MI2S_IBIT, + 0, SNDRV_PCM_STREAM_CAPTURE); + } + break; + case QUATERNARY_TDM_RX_0: case QUATERNARY_TDM_TX_0: if (--(data->quat_tdm_clk_count) == 0) { -- Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project. ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] ASoC: sdm845: Add support for Secondary MI2S interface 2018-11-16 7:41 ` [PATCH 2/2] ASoC: sdm845: Add support for Secondary MI2S interface Rohit kumar @ 2018-11-21 9:22 ` Srinivas Kandagatla 2018-11-21 13:30 ` Applied "ASoC: sdm845: Add support for Secondary MI2S interface" to the asoc tree Mark Brown 1 sibling, 0 replies; 7+ messages in thread From: Srinivas Kandagatla @ 2018-11-21 9:22 UTC (permalink / raw) To: Rohit kumar, plai, bgoswami, lgirdwood, broonie, perex, tiwai, alsa-devel, linux-kernel, rohkumar On 16/11/18 07:41, Rohit kumar wrote: > Add support to configure bit clock for secondary MI2S > TX interface. > > Signed-off-by: Rohit kumar<rohitkr@codeaurora.org> > --- > sound/soc/qcom/sdm845.c | 18 ++++++++++++++++++ Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> ^ permalink raw reply [flat|nested] 7+ messages in thread
* Applied "ASoC: sdm845: Add support for Secondary MI2S interface" to the asoc tree 2018-11-16 7:41 ` [PATCH 2/2] ASoC: sdm845: Add support for Secondary MI2S interface Rohit kumar 2018-11-21 9:22 ` Srinivas Kandagatla @ 2018-11-21 13:30 ` Mark Brown 1 sibling, 0 replies; 7+ messages in thread From: Mark Brown @ 2018-11-21 13:30 UTC (permalink / raw) To: Rohit kumar Cc: Srinivas Kandagatla, Mark Brown, plai, bgoswami, lgirdwood, broonie, perex, tiwai, alsa-devel, linux-kernel, rohkumar, srinivas.kandagatla, alsa-devel The patch ASoC: sdm845: Add support for Secondary MI2S interface has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 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 From 992e75b3c80952fc60946458c75e1bf609e86aa2 Mon Sep 17 00:00:00 2001 From: Rohit kumar <rohitkr@codeaurora.org> Date: Fri, 16 Nov 2018 13:11:58 +0530 Subject: [PATCH] ASoC: sdm845: Add support for Secondary MI2S interface Add support to configure bit clock for secondary MI2S TX interface. Signed-off-by: Rohit kumar <rohitkr@codeaurora.org> Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org> --- sound/soc/qcom/sdm845.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/sound/soc/qcom/sdm845.c b/sound/soc/qcom/sdm845.c index 84e6ee7d78d3..58593db2ab15 100644 --- a/sound/soc/qcom/sdm845.c +++ b/sound/soc/qcom/sdm845.c @@ -19,6 +19,7 @@ struct sdm845_snd_data { struct snd_soc_card *card; uint32_t pri_mi2s_clk_count; + uint32_t sec_mi2s_clk_count; uint32_t quat_tdm_clk_count; }; @@ -121,6 +122,15 @@ static int sdm845_snd_startup(struct snd_pcm_substream *substream) snd_soc_dai_set_fmt(cpu_dai, fmt); break; + case SECONDARY_MI2S_TX: + if (++(data->sec_mi2s_clk_count) == 1) { + snd_soc_dai_set_sysclk(cpu_dai, + Q6AFE_LPASS_CLK_ID_SEC_MI2S_IBIT, + MI2S_BCLK_RATE, SNDRV_PCM_STREAM_CAPTURE); + } + snd_soc_dai_set_fmt(cpu_dai, fmt); + break; + case QUATERNARY_TDM_RX_0: case QUATERNARY_TDM_TX_0: if (++(data->quat_tdm_clk_count) == 1) { @@ -157,6 +167,14 @@ static void sdm845_snd_shutdown(struct snd_pcm_substream *substream) }; break; + case SECONDARY_MI2S_TX: + if (--(data->sec_mi2s_clk_count) == 0) { + snd_soc_dai_set_sysclk(cpu_dai, + Q6AFE_LPASS_CLK_ID_SEC_MI2S_IBIT, + 0, SNDRV_PCM_STREAM_CAPTURE); + } + break; + case QUATERNARY_TDM_RX_0: case QUATERNARY_TDM_TX_0: if (--(data->quat_tdm_clk_count) == 0) { -- 2.19.0.rc2 ^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-11-21 13:30 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2018-11-16 7:41 [PATCH 0/2] ASoC: SDM845: Update MI2S and TDM configuration Rohit kumar 2018-11-16 7:41 ` [PATCH 1/2] ASoC: sdm845: Update slot_width for Quaternary TDM port Rohit kumar 2018-11-21 9:22 ` Srinivas Kandagatla 2018-11-21 13:30 ` Applied "ASoC: sdm845: Update slot_width for Quaternary TDM port" to the asoc tree Mark Brown 2018-11-16 7:41 ` [PATCH 2/2] ASoC: sdm845: Add support for Secondary MI2S interface Rohit kumar 2018-11-21 9:22 ` Srinivas Kandagatla 2018-11-21 13:30 ` Applied "ASoC: sdm845: Add support for Secondary MI2S interface" to the asoc tree Mark Brown
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).