Re: [PATCH 1/2] ASoC: atmel-classd: add the Audio Class D Amplifier code

2015-09-13 Thread Wu, Songjun
On 9/11/2015 18:34, Mark Brown wrote: On Thu, Sep 10, 2015 at 10:31:04AM +0800, Wu, Songjun wrote: On 9/9/2015 17:52, Mark Brown wrote: Yes, that's what's going to end up happening but it's not how controls are expected to behave - applications will expect changing one control to leave othe

Re: [PATCH 1/2] ASoC: atmel-classd: add the Audio Class D Amplifier code

2015-09-11 Thread Mark Brown
On Thu, Sep 10, 2015 at 10:31:04AM +0800, Wu, Songjun wrote: > On 9/9/2015 17:52, Mark Brown wrote: > >Yes, that's what's going to end up happening but it's not how controls > >are expected to behave - applications will expect changing one control > >to leave others unaffected so it's better to re

Re: [PATCH 1/2] ASoC: atmel-classd: add the Audio Class D Amplifier code

2015-09-09 Thread Wu, Songjun
On 9/9/2015 17:52, Mark Brown wrote: On Wed, Sep 09, 2015 at 11:16:08AM +0800, Wu, Songjun wrote: On 9/8/2015 20:23, Mark Brown wrote: If you want to have three controls you need to write code so that the user can only change one of them from 0dB at once, returning an error otherwise. That

Re: [PATCH 1/2] ASoC: atmel-classd: add the Audio Class D Amplifier code

2015-09-09 Thread Mark Brown
On Wed, Sep 09, 2015 at 11:16:08AM +0800, Wu, Songjun wrote: > On 9/8/2015 20:23, Mark Brown wrote: > >If you want to have three controls you need to write code so that the > >user can only change one of them from 0dB at once, returning an error > >otherwise. That was why it looked like they were

Re: [PATCH 1/2] ASoC: atmel-classd: add the Audio Class D Amplifier code

2015-09-08 Thread Wu, Songjun
On 9/8/2015 20:23, Mark Brown wrote: On Tue, Sep 08, 2015 at 05:36:01PM +0800, Wu, Songjun wrote: On 9/8/2015 00:23, Mark Brown wrote: OK, so that's not actually what the code was doing - it had separate enums for bass, mid and treble. If you make this a single enum with all the above opti

Re: [PATCH 1/2] ASoC: atmel-classd: add the Audio Class D Amplifier code

2015-09-08 Thread Mark Brown
On Tue, Sep 08, 2015 at 05:36:01PM +0800, Wu, Songjun wrote: > On 9/8/2015 00:23, Mark Brown wrote: > >OK, so that's not actually what the code was doing - it had separate > >enums for bass, mid and treble. If you make this a single enum with all > >the above options in it that seems like the bes

Re: [PATCH 1/2] ASoC: atmel-classd: add the Audio Class D Amplifier code

2015-09-08 Thread Wu, Songjun
On 9/8/2015 00:23, Mark Brown wrote: On Sun, Sep 06, 2015 at 05:44:21PM +0800, Wu, Songjun wrote: On 9/3/2015 19:37, Mark Brown wrote: On Tue, Sep 01, 2015 at 01:41:40PM +0800, Songjun Wu wrote: +static const char * const eqcfg_bass_text[] = { + "-12 dB", "-6 dB", "0 dB", "+6 dB", "+

Re: [PATCH 1/2] ASoC: atmel-classd: add the Audio Class D Amplifier code

2015-09-07 Thread Mark Brown
On Sun, Sep 06, 2015 at 05:44:21PM +0800, Wu, Songjun wrote: > On 9/3/2015 19:37, Mark Brown wrote: > >On Tue, Sep 01, 2015 at 01:41:40PM +0800, Songjun Wu wrote: > >>+static const char * const eqcfg_bass_text[] = { > >>+ "-12 dB", "-6 dB", "0 dB", "+6 dB", "+12 dB" > >>+}; > > > >>+static const

Re: [PATCH 1/2] ASoC: atmel-classd: add the Audio Class D Amplifier code

2015-09-06 Thread Wu, Songjun
On 9/3/2015 19:37, Mark Brown wrote: On Tue, Sep 01, 2015 at 01:41:40PM +0800, Songjun Wu wrote: +static const char * const mono_text[] = { + "stereo", "mono" +}; + +static SOC_ENUM_SINGLE_DECL(classd_mono_enum, + CLASSD_INTPMR, CLASSD_INTPMR_MONO_SHIFT, +

Re: [PATCH 1/2] ASoC: atmel-classd: add the Audio Class D Amplifier code

2015-09-03 Thread Mark Brown
On Tue, Sep 01, 2015 at 01:41:40PM +0800, Songjun Wu wrote: > +static const char * const mono_text[] = { > + "stereo", "mono" > +}; > + > +static SOC_ENUM_SINGLE_DECL(classd_mono_enum, > + CLASSD_INTPMR, CLASSD_INTPMR_MONO_SHIFT, > + mono_text); This lo

[PATCH 1/2] ASoC: atmel-classd: add the Audio Class D Amplifier code

2015-08-31 Thread Songjun Wu
Add driver for the digital imput to PWM output stereo class D amplifier. It comes with filter, digitally controlled gain, an equalizer and a dmphase filter. Signed-off-by: Songjun Wu --- sound/soc/atmel/Kconfig|9 + sound/soc/atmel/Makefile |2 + sound/soc/atmel/atmel-class