[linux-sunxi] Re: [PATCH v6 02/14] ASoC: sun4i-i2s: Change set_chan_cfg() params

2020-10-05 Thread Samuel Holland
On 10/5/20 7:13 AM, Maxime Ripard wrote: > On Sat, Oct 03, 2020 at 04:19:38PM +0200, Clément Péron wrote: >> 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 setted or not >> in the struct. >>

[linux-sunxi] Re: [PATCH v6 02/14] ASoC: sun4i-i2s: Change set_chan_cfg() params

2020-10-05 Thread Maxime Ripard
On Sat, Oct 03, 2020 at 04:19:38PM +0200, Clément Péron wrote: > 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 setted or not > in the struct. > > Avoid to check for this logic in

[linux-sunxi] Re: [PATCH v6 03/14] ASoC: sun4i-i2s: Change get_sr() and get_wss() to be more explicit

2020-10-05 Thread Maxime Ripard
On Sat, Oct 03, 2020 at 04:19:39PM +0200, Clément Péron wrote: > We are actually using a complex formula to just return a bunch of > simple values. Also this formula is wrong for sun4i when calling > get_wss() the function return 4 instead of 3. > > Replace this with a simpler switch case. > >

[linux-sunxi] Re: [PATCH v6 08/14] ASoC: sun4i-i2s: fix coding-style for callback definition

2020-10-05 Thread Maxime Ripard
On Sat, Oct 03, 2020 at 04:19:44PM +0200, Clément Péron wrote: > Checkpatch script produces warning: > WARNING: function definition argument 'const struct sun4i_i2s *' > should also have an identifier name. > > Let's fix this by adding identifier name to get_bclk_parent_rate() > and set_fmt()

[linux-sunxi] Re: [PATCH v6 02/14] ASoC: sun4i-i2s: Change set_chan_cfg() params

2020-10-05 Thread Clément Péron
Hi Maxime, On Mon, 5 Oct 2020 at 14:13, Maxime Ripard wrote: > > On Sat, Oct 03, 2020 at 04:19:38PM +0200, Clément Péron wrote: > > 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 setted

[linux-sunxi] Re: [PATCH v6 03/14] ASoC: sun4i-i2s: Change get_sr() and get_wss() to be more explicit

2020-10-05 Thread Clément Péron
Hi Maxime, On Mon, 5 Oct 2020 at 14:14, Maxime Ripard wrote: > > On Sat, Oct 03, 2020 at 04:19:39PM +0200, Clément Péron wrote: > > We are actually using a complex formula to just return a bunch of > > simple values. Also this formula is wrong for sun4i when calling > > get_wss() the function