All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] ASoC: Intel: kbl_rt5663_rt5514_max98927: Add dmic format constraint
@ 2019-09-23 16:29 ` Yu-Hsuan Hsu
  0 siblings, 0 replies; 6+ messages in thread
From: Yu-Hsuan Hsu @ 2019-09-23 16:29 UTC (permalink / raw)
  To: linux-kernel
  Cc: Cezary Rojewski, Pierre-Louis Bossart, Liam Girdwood, Jie Yang,
	Mark Brown, Jaroslav Kysela, Takashi Iwai, Kuninori Morimoto,
	Tzung-Bi Shih, Yu-Hsuan Hsu, Thomas Gleixner, alsa-devel

On KBL platform, the microphone is attached to external codec(rt5514)
instead of PCH. However, TDM slot between PCH and codec is 16 bits only.
In order to avoid setting wrong format, we should add a constraint to
force to use 16 bits format forever.

Signed-off-by: Yu-Hsuan Hsu <yuhsuan@chromium.org>
---
I have updated the commit message. Please see whether it is clear
enough. Thanks.
 sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c b/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
index 74dda8784f1a01..67b276a65a8d2d 100644
--- a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
+++ b/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
@@ -400,6 +400,9 @@ static int kabylake_dmic_startup(struct snd_pcm_substream *substream)
 	snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS,
 			dmic_constraints);
 
+	runtime->hw.formats = SNDRV_PCM_FMTBIT_S16_LE;
+	snd_pcm_hw_constraint_msbits(runtime, 0, 16, 16);
+
 	return snd_pcm_hw_constraint_list(substream->runtime, 0,
 			SNDRV_PCM_HW_PARAM_RATE, &constraints_rates);
 }
-- 
2.23.0.351.gc4317032e6-goog


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [alsa-devel] [PATCH v2] ASoC: Intel: kbl_rt5663_rt5514_max98927: Add dmic format constraint
@ 2019-09-23 16:29 ` Yu-Hsuan Hsu
  0 siblings, 0 replies; 6+ messages in thread
From: Yu-Hsuan Hsu @ 2019-09-23 16:29 UTC (permalink / raw)
  To: linux-kernel
  Cc: Cezary Rojewski, Kuninori Morimoto, Takashi Iwai, Jie Yang,
	Pierre-Louis Bossart, Liam Girdwood, Tzung-Bi Shih, Mark Brown,
	Thomas Gleixner, alsa-devel, Yu-Hsuan Hsu

On KBL platform, the microphone is attached to external codec(rt5514)
instead of PCH. However, TDM slot between PCH and codec is 16 bits only.
In order to avoid setting wrong format, we should add a constraint to
force to use 16 bits format forever.

Signed-off-by: Yu-Hsuan Hsu <yuhsuan@chromium.org>
---
I have updated the commit message. Please see whether it is clear
enough. Thanks.
 sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c b/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
index 74dda8784f1a01..67b276a65a8d2d 100644
--- a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
+++ b/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
@@ -400,6 +400,9 @@ static int kabylake_dmic_startup(struct snd_pcm_substream *substream)
 	snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS,
 			dmic_constraints);
 
+	runtime->hw.formats = SNDRV_PCM_FMTBIT_S16_LE;
+	snd_pcm_hw_constraint_msbits(runtime, 0, 16, 16);
+
 	return snd_pcm_hw_constraint_list(substream->runtime, 0,
 			SNDRV_PCM_HW_PARAM_RATE, &constraints_rates);
 }
-- 
2.23.0.351.gc4317032e6-goog

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] ASoC: Intel: kbl_rt5663_rt5514_max98927: Add dmic format constraint
  2019-09-23 16:29 ` [alsa-devel] " Yu-Hsuan Hsu
@ 2019-11-11  2:04   ` Yu-Hsuan Hsu
  -1 siblings, 0 replies; 6+ messages in thread
From: Yu-Hsuan Hsu @ 2019-11-11  2:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Cezary Rojewski, Pierre-Louis Bossart, Liam Girdwood, Jie Yang,
	Mark Brown, Jaroslav Kysela, Takashi Iwai, Kuninori Morimoto,
	Tzung-Bi Shih, Thomas Gleixner, alsa-devel

Hi all,

Does anyone have time to review this patch? It should be easy to
review because it just a format constraint.

Thanks,
Yu-Hsuan

Yu-Hsuan Hsu <yuhsuan@chromium.org> 於 2019年9月24日 週二 上午12:29寫道:
>
> On KBL platform, the microphone is attached to external codec(rt5514)
> instead of PCH. However, TDM slot between PCH and codec is 16 bits only.
> In order to avoid setting wrong format, we should add a constraint to
> force to use 16 bits format forever.
>
> Signed-off-by: Yu-Hsuan Hsu <yuhsuan@chromium.org>
> ---
> I have updated the commit message. Please see whether it is clear
> enough. Thanks.
>  sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c b/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
> index 74dda8784f1a01..67b276a65a8d2d 100644
> --- a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
> +++ b/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
> @@ -400,6 +400,9 @@ static int kabylake_dmic_startup(struct snd_pcm_substream *substream)
>         snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS,
>                         dmic_constraints);
>
> +       runtime->hw.formats = SNDRV_PCM_FMTBIT_S16_LE;
> +       snd_pcm_hw_constraint_msbits(runtime, 0, 16, 16);
> +
>         return snd_pcm_hw_constraint_list(substream->runtime, 0,
>                         SNDRV_PCM_HW_PARAM_RATE, &constraints_rates);
>  }
> --
> 2.23.0.351.gc4317032e6-goog
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [alsa-devel] [PATCH v2] ASoC: Intel: kbl_rt5663_rt5514_max98927: Add dmic format constraint
@ 2019-11-11  2:04   ` Yu-Hsuan Hsu
  0 siblings, 0 replies; 6+ messages in thread
From: Yu-Hsuan Hsu @ 2019-11-11  2:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: Cezary Rojewski, Kuninori Morimoto, Takashi Iwai, Jie Yang,
	Pierre-Louis Bossart, Liam Girdwood, Tzung-Bi Shih, Mark Brown,
	Thomas Gleixner, alsa-devel

Hi all,

Does anyone have time to review this patch? It should be easy to
review because it just a format constraint.

Thanks,
Yu-Hsuan

Yu-Hsuan Hsu <yuhsuan@chromium.org> 於 2019年9月24日 週二 上午12:29寫道:
>
> On KBL platform, the microphone is attached to external codec(rt5514)
> instead of PCH. However, TDM slot between PCH and codec is 16 bits only.
> In order to avoid setting wrong format, we should add a constraint to
> force to use 16 bits format forever.
>
> Signed-off-by: Yu-Hsuan Hsu <yuhsuan@chromium.org>
> ---
> I have updated the commit message. Please see whether it is clear
> enough. Thanks.
>  sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c b/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
> index 74dda8784f1a01..67b276a65a8d2d 100644
> --- a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
> +++ b/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
> @@ -400,6 +400,9 @@ static int kabylake_dmic_startup(struct snd_pcm_substream *substream)
>         snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS,
>                         dmic_constraints);
>
> +       runtime->hw.formats = SNDRV_PCM_FMTBIT_S16_LE;
> +       snd_pcm_hw_constraint_msbits(runtime, 0, 16, 16);
> +
>         return snd_pcm_hw_constraint_list(substream->runtime, 0,
>                         SNDRV_PCM_HW_PARAM_RATE, &constraints_rates);
>  }
> --
> 2.23.0.351.gc4317032e6-goog
>
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [alsa-devel] [PATCH v2] ASoC: Intel: kbl_rt5663_rt5514_max98927: Add dmic format constraint
  2019-09-23 16:29 ` [alsa-devel] " Yu-Hsuan Hsu
@ 2019-11-11 15:36   ` Pierre-Louis Bossart
  -1 siblings, 0 replies; 6+ messages in thread
From: Pierre-Louis Bossart @ 2019-11-11 15:36 UTC (permalink / raw)
  To: Yu-Hsuan Hsu, linux-kernel
  Cc: Cezary Rojewski, Kuninori Morimoto, Takashi Iwai, Jie Yang,
	Liam Girdwood, Tzung-Bi Shih, Mark Brown, Thomas Gleixner,
	alsa-devel



On 9/23/19 11:29 AM, Yu-Hsuan Hsu wrote:
> On KBL platform, the microphone is attached to external codec(rt5514)
> instead of PCH. However, TDM slot between PCH and codec is 16 bits only.
> In order to avoid setting wrong format, we should add a constraint to
> force to use 16 bits format forever.
> 
> Signed-off-by: Yu-Hsuan Hsu <yuhsuan@chromium.org>
> ---
> I have updated the commit message. Please see whether it is clear
> enough. Thanks.

Sorry, I missed this patch. Looks ok, though the 'right' approach would 
be to have topology and/or copiers deal with format changes.

Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>


>   sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c b/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
> index 74dda8784f1a01..67b276a65a8d2d 100644
> --- a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
> +++ b/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
> @@ -400,6 +400,9 @@ static int kabylake_dmic_startup(struct snd_pcm_substream *substream)
>   	snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS,
>   			dmic_constraints);
>   
> +	runtime->hw.formats = SNDRV_PCM_FMTBIT_S16_LE;
> +	snd_pcm_hw_constraint_msbits(runtime, 0, 16, 16);
> +
>   	return snd_pcm_hw_constraint_list(substream->runtime, 0,
>   			SNDRV_PCM_HW_PARAM_RATE, &constraints_rates);
>   }
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [alsa-devel] [PATCH v2] ASoC: Intel: kbl_rt5663_rt5514_max98927: Add dmic format constraint
@ 2019-11-11 15:36   ` Pierre-Louis Bossart
  0 siblings, 0 replies; 6+ messages in thread
From: Pierre-Louis Bossart @ 2019-11-11 15:36 UTC (permalink / raw)
  To: Yu-Hsuan Hsu, linux-kernel
  Cc: Cezary Rojewski, Kuninori Morimoto, Jie Yang, Takashi Iwai,
	Liam Girdwood, Tzung-Bi Shih, Mark Brown, Thomas Gleixner,
	alsa-devel



On 9/23/19 11:29 AM, Yu-Hsuan Hsu wrote:
> On KBL platform, the microphone is attached to external codec(rt5514)
> instead of PCH. However, TDM slot between PCH and codec is 16 bits only.
> In order to avoid setting wrong format, we should add a constraint to
> force to use 16 bits format forever.
> 
> Signed-off-by: Yu-Hsuan Hsu <yuhsuan@chromium.org>
> ---
> I have updated the commit message. Please see whether it is clear
> enough. Thanks.

Sorry, I missed this patch. Looks ok, though the 'right' approach would 
be to have topology and/or copiers deal with format changes.

Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>


>   sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c b/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
> index 74dda8784f1a01..67b276a65a8d2d 100644
> --- a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
> +++ b/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
> @@ -400,6 +400,9 @@ static int kabylake_dmic_startup(struct snd_pcm_substream *substream)
>   	snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS,
>   			dmic_constraints);
>   
> +	runtime->hw.formats = SNDRV_PCM_FMTBIT_S16_LE;
> +	snd_pcm_hw_constraint_msbits(runtime, 0, 16, 16);
> +
>   	return snd_pcm_hw_constraint_list(substream->runtime, 0,
>   			SNDRV_PCM_HW_PARAM_RATE, &constraints_rates);
>   }
> 
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-11-11 16:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-23 16:29 [PATCH v2] ASoC: Intel: kbl_rt5663_rt5514_max98927: Add dmic format constraint Yu-Hsuan Hsu
2019-09-23 16:29 ` [alsa-devel] " Yu-Hsuan Hsu
2019-11-11  2:04 ` Yu-Hsuan Hsu
2019-11-11  2:04   ` [alsa-devel] " Yu-Hsuan Hsu
2019-11-11 15:36 ` Pierre-Louis Bossart
2019-11-11 15:36   ` Pierre-Louis Bossart

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.