[PATCH v7 2/2] ASoC: cros_ec_codec: Reset I2S RX when probing

2021-01-14 Thread Yu-Hsuan Hsu
It is not guaranteed that I2S RX is disabled when the kernel booting. For example, if the kernel crashes while it is enabled, it will keep enabled until the next time EC reboots. Reset I2S RX when probing to fix this issue. Signed-off-by: Yu-Hsuan Hsu --- Updated the info message. sound/soc

[PATCH v7 1/2] cros_ec_commands: Add EC_CODEC_I2S_RX_RESET

2021-01-14 Thread Yu-Hsuan Hsu
Add the new command EC_CODEC_I2S_RX_RESET in ec_codec_i2s_rx_subcmd, which is used for resetting the EC codec. Signed-off-by: Yu-Hsuan Hsu --- include/linux/platform_data/cros_ec_commands.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/platform_data/cros_ec_commands.h b

[PATCH v6 2/2] ASoC: cros_ec_codec: Reset I2S RX when probing

2021-01-13 Thread Yu-Hsuan Hsu
It is not guaranteed that I2S RX is disabled when the kernel booting. For example, if the kernel crashes while it is enabled, it will keep enabled until the next time EC reboots. Reset I2S RX when probing to fix this issue. Signed-off-by: Yu-Hsuan Hsu --- Returns the error code when it fails

[PATCH v6 1/2] cros_ec_commands: Add EC_CODEC_I2S_RX_RESET

2021-01-13 Thread Yu-Hsuan Hsu
Add the new command EC_CODEC_I2S_RX_RESET in ec_codec_i2s_rx_subcmd, which is used for resetting the EC codec. Signed-off-by: Yu-Hsuan Hsu --- include/linux/platform_data/cros_ec_commands.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/platform_data/cros_ec_commands.h b

[PATCH v5] ASoC: cros_ec_codec: Reset I2S RX when probing

2021-01-13 Thread Yu-Hsuan Hsu
It is not guaranteed that I2S RX is disabled when the kernel booting. For example, if the kernel crashes while it is enabled, it will keep enabled until the next time EC reboots. Reset I2S RX when probing to fix this issue. Signed-off-by: Yu-Hsuan Hsu --- This patch checks the return value

Re: [PATCH 2/2] ASoC: cros_ec_codec: Reset I2S RX when probing

2021-01-12 Thread Yu-Hsuan Hsu
Enric Balletbo i Serra 於 2021年1月13日 週三 上午12:34寫道: > > Hi Yu-Hsuan, > > Thank you for the patch. > > On 7/1/21 9:59, Yu-Hsuan Hsu wrote: > > It is not guaranteed that I2S RX is disabled when the kernel booting. > > For example, if the kernel crashes while it is ena

Re: [PATCH 1/2] cros_ec_commands: Add EC_CODEC_I2S_RX_RESET

2021-01-07 Thread Yu-Hsuan Hsu
Mark Brown 於 2021年1月7日 週四 下午9:55寫道: > > On Thu, Jan 07, 2021 at 04:59:41PM +0800, Yu-Hsuan Hsu wrote: > > Add the new command EC_CODEC_I2S_RX_RESET in ec_codec_i2s_rx_subcmd, > > which is used for resetting the EC codec. > > I think the request was to sync over all the com

[PATCH 2/2] ASoC: cros_ec_codec: Reset I2S RX when probing

2021-01-07 Thread Yu-Hsuan Hsu
It is not guaranteed that I2S RX is disabled when the kernel booting. For example, if the kernel crashes while it is enabled, it will keep enabled until the next time EC reboots. Reset I2S RX when probing to fix this issue. Signed-off-by: Yu-Hsuan Hsu --- sound/soc/codecs/cros_ec_codec.c | 7

[PATCH 1/2] cros_ec_commands: Add EC_CODEC_I2S_RX_RESET

2021-01-07 Thread Yu-Hsuan Hsu
Add the new command EC_CODEC_I2S_RX_RESET in ec_codec_i2s_rx_subcmd, which is used for resetting the EC codec. Signed-off-by: Yu-Hsuan Hsu --- include/linux/platform_data/cros_ec_commands.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/platform_data/cros_ec_commands.h b

[PATCH] ASoC: cros_ec_codec: Reset I2S RX when probing

2021-01-05 Thread Yu-Hsuan Hsu
It is not guaranteed that I2S RX is disabled when the kernel booting. For example, if the kernel crashes while it is enabled, it will keep enabled until the next time EC reboots. Reset I2S RX when probing to fix this issue. Signed-off-by: Yu-Hsuan Hsu --- include/linux/platform_data

Re: [PATCH v3 2/2] ASoC: Intel: Add period size constraint on strago board

2020-08-13 Thread Yu-Hsuan Hsu
Pierre-Louis Bossart 於 2020年8月13日 週四 下午8:57寫道: > > > > On 8/13/20 3:45 AM, Takashi Iwai wrote: > > On Thu, 13 Aug 2020 10:36:57 +0200, > > Yu-Hsuan Hsu wrote: > >> > >> Lu, Brent 於 2020年8月13日 週四 下午3:55寫道: > >>> > >>>>>>

Re: [PATCH v3 2/2] ASoC: Intel: Add period size constraint on strago board

2020-08-13 Thread Yu-Hsuan Hsu
Lu, Brent 於 2020年8月13日 週四 下午3:55寫道: > > > > > > > > > CRAS calls snd_pcm_hw_params_set_buffer_size_max() to use as large > > > > buffer as possible. So the period size is an arbitrary number in > > > > different platforms. Atom SST platform happens to be 256, and CML > > > > SOF platform is 1056

Re: [PATCH v3 2/2] ASoC: Intel: Add period size constraint on strago board

2020-08-13 Thread Yu-Hsuan Hsu
Pierre-Louis Bossart 於 2020年8月13日 週四 上午12:38寫道: > > > > On 8/12/20 11:08 AM, Lu, Brent wrote: > >>> > >>> I also wonder what's really missing, too :) > >>> > >>> BTW, I took a look back at the thread, and CRAS seems using a very > >>> large buffer, namely: > >>> [ 52.434791] sound pcmC1D0p:

Re: [PATCH v3 2/2] ASoC: Intel: Add period size constraint on strago board

2020-08-12 Thread Yu-Hsuan Hsu
Takashi Iwai 於 2020年8月12日 週三 下午2:58寫道: > > On Wed, 12 Aug 2020 08:53:42 +0200, > Yu-Hsuan Hsu wrote: > > > > Takashi Iwai 於 2020年8月12日 週三 下午2:14寫道: > > > > > > On Wed, 12 Aug 2020 05:09:58 +0200, > > > Yu-Hsuan Hsu wrote: >

Re: [PATCH v3 2/2] ASoC: Intel: Add period size constraint on strago board

2020-08-12 Thread Yu-Hsuan Hsu
Takashi Iwai 於 2020年8月12日 週三 下午2:14寫道: > > On Wed, 12 Aug 2020 05:09:58 +0200, > Yu-Hsuan Hsu wrote: > > > > Mark Brown 於 2020年8月12日 週三 上午1:22寫道: > > > > > > On Tue, Aug 11, 2020 at 11:54:38AM -0500, Pierre-Louis Bossart wrote: > > > > &g

Re: [PATCH v3 2/2] ASoC: Intel: Add period size constraint on strago board

2020-08-11 Thread Yu-Hsuan Hsu
Mark Brown 於 2020年8月12日 週三 上午1:22寫道: > > On Tue, Aug 11, 2020 at 11:54:38AM -0500, Pierre-Louis Bossart wrote: > > > > constraint logic needs to know about this DSP limitation - it seems like > > > none of this is going to change without something new going into the > > > mix? We at least need a

Re: [PATCH v3 2/2] ASoC: Intel: Add period size constraint on strago board

2020-08-11 Thread Yu-Hsuan Hsu
Takashi Iwai 於 2020年8月11日 週二 下午4:39寫道: > > On Tue, 11 Aug 2020 10:25:22 +0200, > Yu-Hsuan Hsu wrote: > > > > Takashi Iwai 於 2020年8月11日 週二 下午3:43寫道: > > > > > > On Tue, 11 Aug 2020 04:29:24 +0200, > > > Yu-Hsuan Hsu wrote: >

Re: [PATCH v3 2/2] ASoC: Intel: Add period size constraint on strago board

2020-08-11 Thread Yu-Hsuan Hsu
Takashi Iwai 於 2020年8月11日 週二 下午3:43寫道: > > On Tue, 11 Aug 2020 04:29:24 +0200, > Yu-Hsuan Hsu wrote: > > > > Lu, Brent 於 2020年8月11日 週二 上午10:17寫道: > > > > > > > > > > > Sorry for the late reply. CRAS does not set the period size when usi

Re: [PATCH v3 2/2] ASoC: Intel: Add period size constraint on strago board

2020-08-10 Thread Yu-Hsuan Hsu
Lu, Brent 於 2020年8月11日 週二 上午10:17寫道: > > > > > Sorry for the late reply. CRAS does not set the period size when using it. > > The default period size is 256, which consumes the samples quickly(about > > 49627 > > fps when the rate is 48000 fps) at the beginning of the playback. > > Since CRAS

Re: [PATCH v3 2/2] ASoC: Intel: Add period size constraint on strago board

2020-08-10 Thread Yu-Hsuan Hsu
Pierre-Louis Bossart 於 2020年8月10日 週一 下午11:03寫道: > > > > On 8/6/20 11:41 AM, Lu, Brent wrote: > >> > >> I don't get this. If the platform driver already stated 240 and 960 > >> samples why > >> would 432 be chosen? Doesn't this mean the constraint is not applied? > > > > Hi Pierre, > > > > Sorry

Re: [PATCH v2] ASoC: cros_ec_codec: Reset I2S RX when probing

2020-07-17 Thread Yu-Hsuan Hsu
Guenter Roeck 於 2020年7月17日 週五 下午10:32寫道: > > On Thu, Jul 16, 2020 at 10:47 AM Enric Balletbo i Serra > wrote: > > > > Hi, > > > > On 16/7/20 19:23, Guenter Roeck wrote: > > > On Thu, Jul 16, 2020 at 10:09 AM Yu-Hsuan Hsu > > > wrote: > &g

[PATCH v2] ASoC: cros_ec_codec: Reset I2S RX when probing

2020-07-16 Thread Yu-Hsuan Hsu
It is not guaranteed that I2S RX is disabled when the kernel booting. For example, if the kernel crashes while it is enabled, it will keep enabled until the next time EC reboots. Reset I2S RX when probing to fix this issue. Signed-off-by: Yu-Hsuan Hsu --- drivers/platform/chrome/cros_ec_proto.c

Re: [PATCH] ASoC: cros_ec_codec: Reset I2S RX when probing

2020-07-08 Thread Yu-Hsuan Hsu
Guenter Roeck 於 2020年7月9日 週四 上午1:26寫道: > > On Wed, Jul 8, 2020 at 9:17 AM Yu-Hsuan Hsu wrote: > > > > Guenter Roeck 於 2020年7月8日 週三 下午9:28寫道: > > > > > > On Wed, Jul 8, 2020 at 3:16 AM Enric Balletbo i Serra > > > wrote: > > > > >

Re: [PATCH] ASoC: cros_ec_codec: Reset I2S RX when probing

2020-07-08 Thread Yu-Hsuan Hsu
Guenter Roeck 於 2020年7月8日 週三 下午9:28寫道: > > On Wed, Jul 8, 2020 at 3:16 AM Enric Balletbo i Serra > wrote: > > > > Hi Yu-Hsuan, > > > > Thank you for your patch. > > > > On 8/7/20 9:11, Yu-Hsuan Hsu wrote: > > > It is not guar

[PATCH] ASoC: cros_ec_codec: Reset I2S RX when probing

2020-07-08 Thread Yu-Hsuan Hsu
It is not guaranteed that I2S RX is disabled when the kernel booting. For example, if the kernel crashes while it is enabled, it will keep enabled until the next time EC reboots. Reset I2S RX when probing to fix this issue. Signed-off-by: Yu-Hsuan Hsu --- include/linux/platform_data

Re: [PATCH v2] ASoC: cros_ec_codec: Log results when EC commands fail

2020-07-06 Thread Yu-Hsuan Hsu
Yu-Hsuan Hsu 於 2020年7月4日 週六 下午7:34寫道: > > Guenter Roeck 於 2020年7月4日 週六 上午3:28寫道: > > > > On Fri, Jul 3, 2020 at 12:11 PM Yu-Hsuan Hsu wrote: > > > > > > Guenter Roeck 於 2020年7月3日 週五 下午11:58寫道: > > > > > > > > On Fri,

Re: [PATCH v2] ASoC: cros_ec_codec: Log results when EC commands fail

2020-07-04 Thread Yu-Hsuan Hsu
Guenter Roeck 於 2020年7月4日 週六 上午3:28寫道: > > On Fri, Jul 3, 2020 at 12:11 PM Yu-Hsuan Hsu wrote: > > > > Guenter Roeck 於 2020年7月3日 週五 下午11:58寫道: > > > > > > On Fri, Jul 3, 2020 at 3:56 AM Enric Balletbo i Serra > > > wrote: > > > > >

Re: [PATCH v2] ASoC: cros_ec_codec: Log results when EC commands fail

2020-07-03 Thread Yu-Hsuan Hsu
Guenter Roeck 於 2020年7月3日 週五 下午11:58寫道: > > On Fri, Jul 3, 2020 at 3:56 AM Enric Balletbo i Serra > wrote: > > > > Hi Yu-Hsuan, > > > > On 3/7/20 11:40, Yu-Hsuan Hsu wrote: > > > Enric Balletbo i Serra 於 2020年7月3日 週五 > > > 下午5:19寫道: > >

Re: [PATCH v2] ASoC: cros_ec_codec: Log results when EC commands fail

2020-07-03 Thread Yu-Hsuan Hsu
Enric Balletbo i Serra 於 2020年7月3日 週五 下午5:19寫道: > > Hi Yu-Hsuan, > > On 3/7/20 10:48, Yu-Hsuan Hsu wrote: > > Enric Balletbo i Serra 於 2020年7月3日 週五 > > 下午4:38寫道: > >> > >> Hi Yu-Hsuan, > >> > >> Thank you for your patch > >>

Re: [PATCH v2] ASoC: cros_ec_codec: Log results when EC commands fail

2020-07-03 Thread Yu-Hsuan Hsu
Enric Balletbo i Serra 於 2020年7月3日 週五 下午4:38寫道: > > Hi Yu-Hsuan, > > Thank you for your patch > > On 3/7/20 9:19, Yu-Hsuan Hsu wrote: > > Log results of failed EC commands to identify a problem more easily. > > > > Replace cros_ec_cmd_xfer_status with cros_ec

Re: [PATCH v2] ASoC: cros_ec_codec: Log results when EC commands fail

2020-07-03 Thread Yu-Hsuan Hsu
Tzung-Bi Shih 於 2020年7月3日 週五 下午3:32寫道: > > On Fri, Jul 3, 2020 at 3:19 PM Yu-Hsuan Hsu wrote: > > Log results of failed EC commands to identify a problem more easily. > > > > Replace cros_ec_cmd_xfer_status with cros_ec_cmd_xfer because the result > > has already

[PATCH v2] ASoC: cros_ec_codec: Log results when EC commands fail

2020-07-03 Thread Yu-Hsuan Hsu
Log results of failed EC commands to identify a problem more easily. Replace cros_ec_cmd_xfer_status with cros_ec_cmd_xfer because the result has already been checked in this function. The wrapper is not needed. Signed-off-by: Yu-Hsuan Hsu --- sound/soc/codecs/cros_ec_codec.c | 9 - 1

[PATCH] ASoC: cros_ec_codec: Log results when EC commands fail

2020-07-02 Thread Yu-Hsuan Hsu
Log results of failed EC commands to identify a problem more easily. Signed-off-by: Yu-Hsuan Hsu --- sound/soc/codecs/cros_ec_codec.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/cros_ec_codec.c b/sound/soc/codecs/cros_ec_codec.c index

Re: [PATCH] ASoC: rockchip: add format and rate constraints on rk3399

2020-06-30 Thread Yu-Hsuan Hsu
Mark Brown 於 2020年6月30日 週二 下午6:40寫道: > > On Tue, Jun 30, 2020 at 05:16:15PM +0800, Yu-Hsuan Hsu wrote: > > S8 and S24 formats does not work on this machine driver so force to use > > S16_LE instead. > > > In addition, add constraint to limit the max value of rate becau

[PATCH] ASoC: rockchip: add format and rate constraints on rk3399

2020-06-30 Thread Yu-Hsuan Hsu
S8 and S24 formats does not work on this machine driver so force to use S16_LE instead. In addition, add constraint to limit the max value of rate because the rate higher than 96000(172000, 192000) is not stable either. Signed-off-by: Yu-Hsuan Hsu --- sound/soc/rockchip/rk3399_gru_sound.c | 13

[PATCH v2] ASoC: Intel: kbl_rt5663_rt5514_max98927: Add dmic format constraint

2019-09-23 Thread 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 --- I have updated

Re: [alsa-devel] [PATCH] ASoC: Intel: kbl_rt5663_rt5514_max98927: Add dmic format constraint

2019-09-14 Thread Yu-Hsuan Hsu
Pierre-Louis Bossart 於 2019年9月14日 週六 上午1:28寫道: > > please don't top-post on public mailing lists, thanks. > > On 9/13/19 9:45 AM, Yu-Hsuan Hsu wrote: > > Thanks for the review! If I'm not mistaken, the microphone is attached > > to external codec(rt5514) instead of PCH

Re: [alsa-devel] [PATCH] ASoC: Intel: kbl_rt5663_rt5514_max98927: Add dmic format constraint

2019-09-13 Thread Yu-Hsuan Hsu
Pierre-Louis Bossart 於 2019年9月12日 週四 下午9:02寫道: > > On 9/11/19 9:27 PM, Yu-Hsuan Hsu wrote: > > 24 bits recording from DMIC is not supported for KBL platform because > > the TDM slot between PCH and codec is 16 bits only. We should add a > > constraint to remove that unsu

[PATCH] ASoC: Intel: kbl_rt5663_rt5514_max98927: Add dmic format constraint

2019-09-11 Thread Yu-Hsuan Hsu
24 bits recording from DMIC is not supported for KBL platform because the TDM slot between PCH and codec is 16 bits only. We should add a constraint to remove that unsupported format. Signed-off-by: Yu-Hsuan Hsu --- sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c | 3 +++ 1 file changed, 3

[PATCH v6] ASoC: max98090: remove 24-bit format support if RJ is 0

2019-06-17 Thread Yu-Hsuan Hsu
The supported formats are S16_LE and S24_LE now. However, S24_LE is not supported when TDM is 0 and it is not in the right justified mode. We should remove 24-bit format in that situation to avoid triggering error. Signed-off-by: Yu-Hsuan Hsu --- Changed the order of the conditional. Remove

[PATCH v5] ASoC: max98090: remove 24-bit format support if RJ is 0

2019-06-16 Thread Yu-Hsuan Hsu
The supported formats are S16_LE and S24_LE now. However, S24_LE is not supported when TDM is 0 and it is not in the right justified mode. We should remove 24-bit format in that situation to avoid triggering error. Signed-off-by: Yu-Hsuan Hsu --- The datasheet said that when TDM=0 and RJ=0

[PATCH v4] ASoC: max98090: remove 24-bit format support if RJ is 0

2019-06-04 Thread Yu-Hsuan Hsu
The supported formats are S16_LE and S24_LE now. However, by datasheet of max98090, S24_LE is only supported when it is in the right justified mode. We should remove 24-bit format if it is not in that mode to avoid triggering error. Signed-off-by: Yu-Hsuan Hsu --- Remove Change-Id. sound/soc

[PATCH v3] ASoC: max98090: remove 24-bit format support if RJ is 0

2019-06-04 Thread Yu-Hsuan Hsu
-by: Yu-Hsuan Hsu --- Fix compile error. codec->dai => dai runtime => substream->runtime sound/soc/codecs/max98090.c | 16 1 file changed, 16 insertions(+) diff --git a/sound/soc/codecs/max98090.c b/sound/soc/codecs/max98090.c index 7619ea31ab50..ada8c25e643d 100644

[PATCH v2] ASoC: max98090: remove 24-bit format support if RJ is 0

2019-06-04 Thread Yu-Hsuan Hsu
The supported formats are S16_LE and S24_LE now. However, by datasheet of max98090, S24_LE is only supported when it is in the right justified mode. We should remove 24-bit format if it is not in that mode to avoid triggering error. Signed-off-by: Yu-Hsuan Hsu --- sound/soc/codecs/max98090.c

[PATCH] ASoC: max98090: remove 24-bit format support if RJ is 0

2019-06-04 Thread Yu-Hsuan Hsu
The supported formats are S16_LE and S24_LE now. However, by datasheet of max98090, S24_LE is only supported when it is in the right justified mode. We should remove 24-bit format if it is not in that mode to avoid triggering error. Signed-off-by: Yu-Hsuan Hsu --- sound/soc/codecs/max98090.c

[PATCH] ASoC: max98090: remove 24-bit format support

2019-05-10 Thread Yu-Hsuan Hsu
Remove 24-bit format support because it doesn't work now. We can revert this change after it really supports. (https://patchwork.kernel.org/patch/10783561/) Signed-off-by: Yu-Hsuan Hsu --- sound/soc/codecs/max98090.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc

[PATCH] ASoC: da7219: Update the support rate list

2019-05-01 Thread Yu-Hsuan Hsu
If we want to set rate to 64000 on da7219, it fails and returns "snd_pcm_hw_params: Invalid argument". We should remove 64000 from support rate list because it is not available. Signed-off-by: Yu-Hsuan Hsu --- sound/soc/codecs/da7219.c | 10 -- 1 file changed, 8 insert