Re: [PATCH v9 01/14] ASoC: sun4i-i2s: Change set_chan_cfg() params

2020-10-30 Thread Clément Péron
Hi Samuel On Fri, 30 Oct 2020 at 02:20, Samuel Holland wrote: > > On 10/27/20 4:43 PM, Clément Péron wrote: > > Hi Pierre-Louis, > > > > On Tue, 27 Oct 2020 at 19:59, Pierre-Louis Bossart > > wrote: > >> > >> > >>> @@ -452,11 +454,11 @@ static int sun8i_i2s_set_chan_cfg(const struct > >>> sun4i

Re: [PATCH v9 01/14] ASoC: sun4i-i2s: Change set_chan_cfg() params

2020-10-29 Thread Samuel Holland
On 10/27/20 4:43 PM, Clément Péron wrote: > Hi Pierre-Louis, > > On Tue, 27 Oct 2020 at 19:59, Pierre-Louis Bossart > wrote: >> >> >>> @@ -452,11 +454,11 @@ static int sun8i_i2s_set_chan_cfg(const struct >>> sun4i_i2s *i2s, >>> case SND_SOC_DAIFMT_DSP_B: >>> case SND_SOC_DAIFMT_LEFT_

Re: [PATCH v9 01/14] ASoC: sun4i-i2s: Change set_chan_cfg() params

2020-10-27 Thread Clément Péron
Hi Pierre-Louis, On Tue, 27 Oct 2020 at 19:59, Pierre-Louis Bossart wrote: > > > > @@ -452,11 +454,11 @@ static int sun8i_i2s_set_chan_cfg(const struct > > sun4i_i2s *i2s, > > case SND_SOC_DAIFMT_DSP_B: > > case SND_SOC_DAIFMT_LEFT_J: > > case SND_SOC_DAIFMT_RIGHT_J: > > -

Re: [PATCH v9 01/14] ASoC: sun4i-i2s: Change set_chan_cfg() params

2020-10-27 Thread Pierre-Louis Bossart
@@ -452,11 +454,11 @@ static int sun8i_i2s_set_chan_cfg(const struct sun4i_i2s *i2s, case SND_SOC_DAIFMT_DSP_B: case SND_SOC_DAIFMT_LEFT_J: case SND_SOC_DAIFMT_RIGHT_J: - lrck_period = params_physical_width(params) * slots; + lrck_period = sl

[PATCH v9 01/14] ASoC: sun4i-i2s: Change set_chan_cfg() params

2020-10-27 Thread Clément Péron
As slots and slot_width can be set manually using set_tdm(). These values are then kept in sun4i_i2s struct. So we need to check if these values are set or not. This is not done actually and will trigger a bug. For example, if we set to the simple soundcard in the device-tree dai-tdm-slot-width =