Re: [PATCH 2/3] ASoC: tas571x: New driver for TI TAS571x power amplifiers

2015-04-24 Thread Mark Brown
On Fri, Apr 24, 2015 at 06:52:01AM -0700, Kevin Cernekee wrote: > On Fri, Apr 24, 2015 at 2:28 AM, Mark Brown wrote: > > Do you need to work around it? If the register map is being perserved > > you don't need to sync so just don't do it - it's just that the normal > > expectation would be that

Re: [PATCH 2/3] ASoC: tas571x: New driver for TI TAS571x power amplifiers

2015-04-24 Thread Kevin Cernekee
On Fri, Apr 24, 2015 at 2:28 AM, Mark Brown wrote: > On Thu, Apr 23, 2015 at 05:47:49PM -0700, Kevin Cernekee wrote: > >> This is mostly working OK, but regcache_sync() assumes that the >> hardware registers have been reset back to the default values. The >> "pdn" GPIO doesn't actually reset the

Re: [PATCH 2/3] ASoC: tas571x: New driver for TI TAS571x power amplifiers

2015-04-24 Thread Mark Brown
On Thu, Apr 23, 2015 at 05:47:49PM -0700, Kevin Cernekee wrote: > This is mostly working OK, but regcache_sync() assumes that the > hardware registers have been reset back to the default values. The > "pdn" GPIO doesn't actually reset the state of the tas571x; it just > makes I2C inaccessible

Re: [PATCH 2/3] ASoC: tas571x: New driver for TI TAS571x power amplifiers

2015-04-24 Thread Mark Brown
On Thu, Apr 23, 2015 at 05:47:49PM -0700, Kevin Cernekee wrote: This is mostly working OK, but regcache_sync() assumes that the hardware registers have been reset back to the default values. The pdn GPIO doesn't actually reset the state of the tas571x; it just makes I2C inaccessible and

Re: [PATCH 2/3] ASoC: tas571x: New driver for TI TAS571x power amplifiers

2015-04-24 Thread Kevin Cernekee
On Fri, Apr 24, 2015 at 2:28 AM, Mark Brown broo...@kernel.org wrote: On Thu, Apr 23, 2015 at 05:47:49PM -0700, Kevin Cernekee wrote: This is mostly working OK, but regcache_sync() assumes that the hardware registers have been reset back to the default values. The pdn GPIO doesn't actually

Re: [PATCH 2/3] ASoC: tas571x: New driver for TI TAS571x power amplifiers

2015-04-24 Thread Mark Brown
On Fri, Apr 24, 2015 at 06:52:01AM -0700, Kevin Cernekee wrote: On Fri, Apr 24, 2015 at 2:28 AM, Mark Brown broo...@kernel.org wrote: Do you need to work around it? If the register map is being perserved you don't need to sync so just don't do it - it's just that the normal expectation

Re: [PATCH 2/3] ASoC: tas571x: New driver for TI TAS571x power amplifiers

2015-04-23 Thread Kevin Cernekee
On Sat, Apr 18, 2015 at 9:16 AM, Kevin Cernekee wrote: >>> + case SND_SOC_BIAS_OFF: >>> + /* Note that this kills I2C accesses. */ >>> + assert_pdn = 1; >> >> No, the GPIO set associated with it kills I2C access. I'd also expect >> to see the regmap being marked cache

Re: [PATCH 2/3] ASoC: tas571x: New driver for TI TAS571x power amplifiers

2015-04-23 Thread Kevin Cernekee
On Sat, Apr 18, 2015 at 9:16 AM, Kevin Cernekee cerne...@chromium.org wrote: + case SND_SOC_BIAS_OFF: + /* Note that this kills I2C accesses. */ + assert_pdn = 1; No, the GPIO set associated with it kills I2C access. I'd also expect to see the regmap being marked

Re: [alsa-devel] [PATCH 2/3] ASoC: tas571x: New driver for TI TAS571x power amplifiers

2015-04-20 Thread Mark Brown
On Mon, Apr 20, 2015 at 01:56:46PM -0700, Kevin Cernekee wrote: > On Thu, Apr 16, 2015 at 5:57 AM, Lars-Peter Clausen wrote: > > On 04/15/2015 11:42 PM, Kevin Cernekee wrote: > > If you want to make the clock optional use > > if (PTR_ERR(priv->mclk) == -ENOENT) > >

Re: [alsa-devel] [PATCH 2/3] ASoC: tas571x: New driver for TI TAS571x power amplifiers

2015-04-20 Thread Kevin Cernekee
On Thu, Apr 16, 2015 at 5:57 AM, Lars-Peter Clausen wrote: > On 04/15/2015 11:42 PM, Kevin Cernekee wrote: >> >> Introduce a new codec driver for the Texas Instruments >> TAS5711/TAS5717/TAS5719 power amplifier chips. These chips are typically >> used to take an I2S digital audio input and drive

Re: [PATCH 2/3] ASoC: tas571x: New driver for TI TAS571x power amplifiers

2015-04-20 Thread Mark Brown
On Mon, Apr 20, 2015 at 08:12:36AM -0700, Kevin Cernekee wrote: > On Mon, Apr 20, 2015 at 5:21 AM, Mark Brown wrote: > >> The same check shows up in numerous other drivers, including the one > >> for the audio controller on my board. > > Sounds like either that (undisclosed) driver has a

Re: [PATCH 2/3] ASoC: tas571x: New driver for TI TAS571x power amplifiers

2015-04-20 Thread Andrew Bresticker
Hi Kevin, On Mon, Apr 20, 2015 at 8:12 AM, Kevin Cernekee wrote: > On Mon, Apr 20, 2015 at 5:21 AM, Mark Brown wrote: >> On Sat, Apr 18, 2015 at 01:07:07PM -0700, Kevin Cernekee wrote: >>> On Sat, Apr 18, 2015 at 10:11 AM, Mark Brown wrote: >> >>> > Someone trying to use the atmel_wm8904

Re: [PATCH 2/3] ASoC: tas571x: New driver for TI TAS571x power amplifiers

2015-04-20 Thread Kevin Cernekee
On Mon, Apr 20, 2015 at 5:21 AM, Mark Brown wrote: > On Sat, Apr 18, 2015 at 01:07:07PM -0700, Kevin Cernekee wrote: >> On Sat, Apr 18, 2015 at 10:11 AM, Mark Brown wrote: > >> > Someone trying to use the atmel_wm8904 driver with something other than >> > a wm8904 shouldn't really be expecting a

Re: [PATCH 2/3] ASoC: tas571x: New driver for TI TAS571x power amplifiers

2015-04-20 Thread Mark Brown
On Sat, Apr 18, 2015 at 01:07:07PM -0700, Kevin Cernekee wrote: > On Sat, Apr 18, 2015 at 10:11 AM, Mark Brown wrote: > > Someone trying to use the atmel_wm8904 driver with something other than > > a wm8904 shouldn't really be expecting a good experince... > The same check shows up in numerous

Re: [alsa-devel] [PATCH 2/3] ASoC: tas571x: New driver for TI TAS571x power amplifiers

2015-04-20 Thread Kevin Cernekee
On Thu, Apr 16, 2015 at 5:57 AM, Lars-Peter Clausen l...@metafoo.de wrote: On 04/15/2015 11:42 PM, Kevin Cernekee wrote: Introduce a new codec driver for the Texas Instruments TAS5711/TAS5717/TAS5719 power amplifier chips. These chips are typically used to take an I2S digital audio input and

Re: [alsa-devel] [PATCH 2/3] ASoC: tas571x: New driver for TI TAS571x power amplifiers

2015-04-20 Thread Mark Brown
On Mon, Apr 20, 2015 at 01:56:46PM -0700, Kevin Cernekee wrote: On Thu, Apr 16, 2015 at 5:57 AM, Lars-Peter Clausen l...@metafoo.de wrote: On 04/15/2015 11:42 PM, Kevin Cernekee wrote: If you want to make the clock optional use if (PTR_ERR(priv-mclk) == -ENOENT)

Re: [PATCH 2/3] ASoC: tas571x: New driver for TI TAS571x power amplifiers

2015-04-20 Thread Mark Brown
On Mon, Apr 20, 2015 at 08:12:36AM -0700, Kevin Cernekee wrote: On Mon, Apr 20, 2015 at 5:21 AM, Mark Brown broo...@kernel.org wrote: The same check shows up in numerous other drivers, including the one for the audio controller on my board. Sounds like either that (undisclosed) driver has

Re: [PATCH 2/3] ASoC: tas571x: New driver for TI TAS571x power amplifiers

2015-04-20 Thread Mark Brown
On Sat, Apr 18, 2015 at 01:07:07PM -0700, Kevin Cernekee wrote: On Sat, Apr 18, 2015 at 10:11 AM, Mark Brown broo...@kernel.org wrote: Someone trying to use the atmel_wm8904 driver with something other than a wm8904 shouldn't really be expecting a good experince... The same check shows up

Re: [PATCH 2/3] ASoC: tas571x: New driver for TI TAS571x power amplifiers

2015-04-20 Thread Kevin Cernekee
On Mon, Apr 20, 2015 at 5:21 AM, Mark Brown broo...@kernel.org wrote: On Sat, Apr 18, 2015 at 01:07:07PM -0700, Kevin Cernekee wrote: On Sat, Apr 18, 2015 at 10:11 AM, Mark Brown broo...@kernel.org wrote: Someone trying to use the atmel_wm8904 driver with something other than a wm8904

Re: [PATCH 2/3] ASoC: tas571x: New driver for TI TAS571x power amplifiers

2015-04-20 Thread Andrew Bresticker
Hi Kevin, On Mon, Apr 20, 2015 at 8:12 AM, Kevin Cernekee cerne...@chromium.org wrote: On Mon, Apr 20, 2015 at 5:21 AM, Mark Brown broo...@kernel.org wrote: On Sat, Apr 18, 2015 at 01:07:07PM -0700, Kevin Cernekee wrote: On Sat, Apr 18, 2015 at 10:11 AM, Mark Brown broo...@kernel.org wrote:

Re: [PATCH 2/3] ASoC: tas571x: New driver for TI TAS571x power amplifiers

2015-04-18 Thread Kevin Cernekee
On Sat, Apr 18, 2015 at 10:11 AM, Mark Brown wrote: > On Sat, Apr 18, 2015 at 09:16:36AM -0700, Kevin Cernekee wrote: >> On Sat, Apr 18, 2015 at 4:36 AM, Mark Brown wrote: > >> >> +static int tas571x_set_sysclk(struct snd_soc_dai *dai, >> >> + int clk_id, unsigned int

Re: [PATCH 2/3] ASoC: tas571x: New driver for TI TAS571x power amplifiers

2015-04-18 Thread Mark Brown
On Sat, Apr 18, 2015 at 09:16:36AM -0700, Kevin Cernekee wrote: > On Sat, Apr 18, 2015 at 4:36 AM, Mark Brown wrote: > >> +static int tas571x_set_sysclk(struct snd_soc_dai *dai, > >> + int clk_id, unsigned int freq, int dir) > > Remove empty functions, at best they

Re: [PATCH 2/3] ASoC: tas571x: New driver for TI TAS571x power amplifiers

2015-04-18 Thread Kevin Cernekee
On Sat, Apr 18, 2015 at 4:36 AM, Mark Brown wrote: > On Wed, Apr 15, 2015 at 02:42:20PM -0700, Kevin Cernekee wrote: >> +static int tas571x_set_sysclk(struct snd_soc_dai *dai, >> + int clk_id, unsigned int freq, int dir) >> +{ >> + /* >> + * TAS5717 datasheet pg

Re: [alsa-devel] [PATCH 2/3] ASoC: tas571x: New driver for TI TAS571x power amplifiers

2015-04-18 Thread Mark Brown
On Thu, Apr 16, 2015 at 02:57:49PM +0200, Lars-Peter Clausen wrote: > On 04/15/2015 11:42 PM, Kevin Cernekee wrote: > >+case TAS571X_ID_5711: > >+priv->codec_driver.controls = tas5711_controls; > >+priv->codec_driver.num_controls = ARRAY_SIZE(tas5711_controls); > >+

Re: [PATCH 2/3] ASoC: tas571x: New driver for TI TAS571x power amplifiers

2015-04-18 Thread Mark Brown
On Wed, Apr 15, 2015 at 02:42:20PM -0700, Kevin Cernekee wrote: This looks mostly good but several things below, all of which should be straightforward to fix. > +static int tas571x_set_sysclk(struct snd_soc_dai *dai, > + int clk_id, unsigned int freq, int dir) > +{ > +

Re: [alsa-devel] [PATCH 2/3] ASoC: tas571x: New driver for TI TAS571x power amplifiers

2015-04-18 Thread Mark Brown
On Thu, Apr 16, 2015 at 02:57:49PM +0200, Lars-Peter Clausen wrote: On 04/15/2015 11:42 PM, Kevin Cernekee wrote: +case TAS571X_ID_5711: +priv-codec_driver.controls = tas5711_controls; +priv-codec_driver.num_controls = ARRAY_SIZE(tas5711_controls); +

Re: [PATCH 2/3] ASoC: tas571x: New driver for TI TAS571x power amplifiers

2015-04-18 Thread Mark Brown
On Wed, Apr 15, 2015 at 02:42:20PM -0700, Kevin Cernekee wrote: This looks mostly good but several things below, all of which should be straightforward to fix. +static int tas571x_set_sysclk(struct snd_soc_dai *dai, + int clk_id, unsigned int freq, int dir) +{ +

Re: [PATCH 2/3] ASoC: tas571x: New driver for TI TAS571x power amplifiers

2015-04-18 Thread Mark Brown
On Sat, Apr 18, 2015 at 09:16:36AM -0700, Kevin Cernekee wrote: On Sat, Apr 18, 2015 at 4:36 AM, Mark Brown broo...@kernel.org wrote: +static int tas571x_set_sysclk(struct snd_soc_dai *dai, + int clk_id, unsigned int freq, int dir) Remove empty functions, at best

Re: [PATCH 2/3] ASoC: tas571x: New driver for TI TAS571x power amplifiers

2015-04-18 Thread Kevin Cernekee
On Sat, Apr 18, 2015 at 4:36 AM, Mark Brown broo...@kernel.org wrote: On Wed, Apr 15, 2015 at 02:42:20PM -0700, Kevin Cernekee wrote: +static int tas571x_set_sysclk(struct snd_soc_dai *dai, + int clk_id, unsigned int freq, int dir) +{ + /* + * TAS5717

Re: [PATCH 2/3] ASoC: tas571x: New driver for TI TAS571x power amplifiers

2015-04-18 Thread Kevin Cernekee
On Sat, Apr 18, 2015 at 10:11 AM, Mark Brown broo...@kernel.org wrote: On Sat, Apr 18, 2015 at 09:16:36AM -0700, Kevin Cernekee wrote: On Sat, Apr 18, 2015 at 4:36 AM, Mark Brown broo...@kernel.org wrote: +static int tas571x_set_sysclk(struct snd_soc_dai *dai, +

Re: [alsa-devel] [PATCH 2/3] ASoC: tas571x: New driver for TI TAS571x power amplifiers

2015-04-16 Thread Lars-Peter Clausen
On 04/15/2015 11:42 PM, Kevin Cernekee wrote: Introduce a new codec driver for the Texas Instruments TAS5711/TAS5717/TAS5719 power amplifier chips. These chips are typically used to take an I2S digital audio input and drive 10-20W into a pair of speakers. Signed-off-by: Kevin Cernekee Looks

Re: [alsa-devel] [PATCH 2/3] ASoC: tas571x: New driver for TI TAS571x power amplifiers

2015-04-16 Thread Lars-Peter Clausen
On 04/15/2015 11:42 PM, Kevin Cernekee wrote: Introduce a new codec driver for the Texas Instruments TAS5711/TAS5717/TAS5719 power amplifier chips. These chips are typically used to take an I2S digital audio input and drive 10-20W into a pair of speakers. Signed-off-by: Kevin Cernekee

[PATCH 2/3] ASoC: tas571x: New driver for TI TAS571x power amplifiers

2015-04-15 Thread Kevin Cernekee
Introduce a new codec driver for the Texas Instruments TAS5711/TAS5717/TAS5719 power amplifier chips. These chips are typically used to take an I2S digital audio input and drive 10-20W into a pair of speakers. Signed-off-by: Kevin Cernekee --- sound/soc/codecs/Kconfig | 5 +

[PATCH 2/3] ASoC: tas571x: New driver for TI TAS571x power amplifiers

2015-04-15 Thread Kevin Cernekee
Introduce a new codec driver for the Texas Instruments TAS5711/TAS5717/TAS5719 power amplifier chips. These chips are typically used to take an I2S digital audio input and drive 10-20W into a pair of speakers. Signed-off-by: Kevin Cernekee cerne...@chromium.org --- sound/soc/codecs/Kconfig |