[alsa-devel][PATCH 2/3] ASoC: fsl_spdif: Add driver suspend and resume to support MEGA Fast

2015-07-06 Thread Zidan Wang
For i.MX6 SoloX, there is a mode of the SoC to shutdown all power source of modules during system suspend and resume procedure. Thus, SAI needs to save all the values of registers before the system suspend and restore them after the system resume. Signed-off-by: Zidan Wang --- sound/soc/fsl

[alsa-devel][PATCH 3/3] ASoC: fsl_sai: Add driver suspend and resume to support MEGA Fast

2015-07-06 Thread Zidan Wang
For i.MX6 SoloX, there is a mode of the SoC to shutdown all power source of modules during system suspend and resume procedure. Thus, SAI needs to save all the values of registers before the system suspend and restore them after the system resume. Signed-off-by: Zidan Wang --- sound/soc/fsl

[alsa-devel][PATCH 1/3] ASoC: fsl_esai: Add driver suspend and resume to support MEGA Fast

2015-07-06 Thread Zidan Wang
For i.MX6 SoloX, there is a mode of the SoC to shutdown all power source of modules during system suspend and resume procedure. Thus, SAI needs to save all the values of registers before the system suspend and restore them after the system resume. Signed-off-by: Zidan Wang --- sound/soc/fsl

[alsa-devel][PATCH 2/2] ASoC: fsl_ssi: sound is wrong after suspend/resume

2015-07-06 Thread Zidan Wang
The register SFCSR is volatile, but some bits in it need to be recovered after suspend/resume. Signed-off-by: Zidan Wang --- sound/soc/fsl/fsl_ssi.c | 12 1 file changed, 12 insertions(+) diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c index 52b894f..e414f18 100644

[alsa-devel][PATCH 1/2] ASoC: fsl_ssi: Add driver suspend and resume to support MEGA Fast

2015-07-06 Thread Zidan Wang
For i.MX6 SoloX, there is a mode of the SoC to shutdown all power source of modules during system suspend and resume procedure. Thus, SSI needs to save all the values of registers before the system suspend and restore them after the system resume. Signed-off-by: Zidan Wang --- sound/soc/fsl

[alsa-devel][PATCH v2] ASoC: wm8960: update pll and clock setting function

2015-07-03 Thread Zidan Wang
ister. When playback and capture simultaneously, the second stream should not set pll, should not change the sysclk and bclk, just need set DAC/ADC divider to support different TX and RX sample rate. Signed-off-by: Zidan Wang --- sound/soc/codecs/wm8960.c

Re: [alsa-devel][PATCH] ASoC: wm8960: update pll and clock setting function

2015-07-01 Thread Zidan Wang
On Tue, Jun 30, 2015 at 11:42:00AM +0100, Charles Keepax wrote: > On Tue, Jun 30, 2015 at 04:54:09PM +0800, Zidan Wang wrote: > > On Mon, Jun 29, 2015 at 10:44:12AM +0100, Charles Keepax wrote: > > > On Fri, Jun 26, 2015 at 07:09:22PM +0800, Zidan Wang wrote: > > > >

Re: [alsa-devel][PATCH] ASoC: wm8960: update pll and clock setting function

2015-06-30 Thread Zidan Wang
On Mon, Jun 29, 2015 at 10:44:12AM +0100, Charles Keepax wrote: > On Fri, Jun 26, 2015 at 07:09:22PM +0800, Zidan Wang wrote: > > When using snd_soc_dai_set_pll to set pll in machine driver, we > > should set pll in and pll out freq and ensure 5 < PLLN < 13, > > other

[alsa-devel][PATCH] ASoC: wm8960: update pll and clock setting function

2015-06-26 Thread Zidan Wang
ll out freq and set the pll again. Signed-off-by: Zidan Wang --- sound/soc/codecs/wm8960.c | 160 -- 1 file changed, 126 insertions(+), 34 deletions(-) diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c index 94c5c46..9b17ca7 100644

Re: [alsa-devel][PATCH v2] ASoC: wm8960: add dapm kcontrols to select left/right ADC input source

2015-06-17 Thread Zidan Wang
On Tue, Jun 16, 2015 at 01:18:39PM +0100, Charles Keepax wrote: > On Tue, Jun 16, 2015 at 02:23:19PM +0800, Zidan Wang wrote: > > Add dapm kcontrols to select left/right ADC input source, one to select > > the left ADC input source and one for the right ADC input source. > >

Re: [alsa-devel][PATCH 1/4] ASoC: wm8960: codec mclk should be enabled early to avoid jack detect error

2015-06-16 Thread Zidan Wang
On Fri, Jun 12, 2015 at 11:33:49AM +0100, Mark Brown wrote: > On Fri, Jun 12, 2015 at 02:32:33PM +0800, Zidan Wang wrote: > > > I have done some test today, and found that after mclk enable, we should > > delay > > at least 150ms to prepare the jack detect function.

Re: [alsa-devel][PATCH 2/4] ASoC: wm8960: support configure headphone jack detect pin and polarity from device tree

2015-06-16 Thread Zidan Wang
On Fri, Jun 12, 2015 at 01:50:05PM +0100, Charles Keepax wrote: > On Thu, Jun 11, 2015 at 07:14:34PM +0800, Zidan Wang wrote: > > The ADCLRC/GPIO1, LINPUT3/JD2 and RINPUT3/JD3 pins can be selected as > > headphone jack detect inputs to automatically disable the speaker output >

[alsa-devel][PATCH v2] ASoC: wm8960: add dapm kcontrols to select left/right ADC input source

2015-06-15 Thread Zidan Wang
left(right) input path will be powered down. Signed-off-by: Zidan Wang --- sound/soc/codecs/wm8960.c | 24 ++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c index 023e898..3ea12b7 100644 --- a/sound/soc

[alsa-devel][PATCH] ASoC: wm8960: add two kcontrols to select ADC left/right channel source

2015-06-15 Thread Zidan Wang
Add two kcontrols to select ADC left/right channel source, one to select the left channel source and one for the right channel source. Signed-off-by: Zidan Wang --- sound/soc/codecs/wm8960.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs

Re: [alsa-devel][PATCH] ASoC: fsl: add imx-wm8960 machine driver

2015-06-12 Thread Zidan Wang
On Thu, Jun 11, 2015 at 08:51:07AM -0700, Nicolin Chen wrote: > On Thu, Jun 11, 2015 at 07:10:00PM +0800, Zidan Wang wrote: > > > > > This imx-wm8960 device-tree-only machine driver works with sai driver > > > > and have below feature. > > >

Re: [alsa-devel][PATCH 1/4] ASoC: wm8960: codec mclk should be enabled early to avoid jack detect error

2015-06-11 Thread Zidan Wang
On Thu, Jun 11, 2015 at 05:20:28PM +0100, Mark Brown wrote: > On Thu, Jun 11, 2015 at 07:14:33PM +0800, Zidan Wang wrote: > > It will playback from speaker in the first 2 seconds, then switch to > > headphone. Steps to reproduce this issue: > > 1. plug out headphone and playba

[alsa-devel][PATCH 2/4] ASoC: wm8960: support configure headphone jack detect pin and polarity from device tree

2015-06-11 Thread Zidan Wang
The ADCLRC/GPIO1, LINPUT3/JD2 and RINPUT3/JD3 pins can be selected as headphone jack detect inputs to automatically disable the speaker output and enable the headphone. Signed-off-by: Zidan Wang --- Documentation/devicetree/bindings/sound/wm8960.txt | 11 +++ include/sound/wm8960.h

[alsa-devel][PATCH 3/4] ASoC: wm8960: add kcontrol to select ADC data output

2015-06-11 Thread Zidan Wang
add kcontrol to select ADC data output. Signed-off-by: Zidan Wang --- sound/soc/codecs/wm8960.c | 9 + 1 file changed, 9 insertions(+) diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c index c1be15c..62246f1 100644 --- a/sound/soc/codecs/wm8960.c +++ b/sound/soc/codecs

[alsa-devel][PATCH 4/4] ASoC: wm8960: the enum of "DAC Polarity" should be wm8960_enum[1]

2015-06-11 Thread Zidan Wang
the enum of "DAC Polarity" should be wm8960_enum[1]. Signed-off-by: Zidan Wang --- sound/soc/codecs/wm8960.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c index 62246f1..d482c0f 100644 --- a/sound/soc/codec

[alsa-devel][PATCH 1/4] ASoC: wm8960: codec mclk should be enabled early to avoid jack detect error

2015-06-11 Thread Zidan Wang
It will playback from speaker in the first 2 seconds, then switch to headphone. Steps to reproduce this issue: 1. plug out headphone and playback a wav. 2. stop playback and wait for at least 5 seconds, then plug in headphone and playback a wav. Signed-off-by: Zidan Wang --- sound/soc/codecs

Re: [alsa-devel][PATCH] ASoC: fsl: add imx-wm8960 machine driver

2015-06-11 Thread Zidan Wang
On Wed, Jun 10, 2015 at 11:36:21AM -0700, Nicolin Chen wrote: > On Wed, Jun 10, 2015 at 04:26:27PM +0800, Zidan Wang wrote: > > This imx-wm8960 device-tree-only machine driver works with sai driver > > and have below feature. > > * support codec master and slave mode > &g

[alsa-devel][PATCH] ASoC: fsl: add imx-wm8960 machine driver

2015-06-10 Thread Zidan Wang
This imx-wm8960 device-tree-only machine driver works with sai driver and have below feature. * support codec master and slave mode * support headphone jack detect * support headphone and micphone jack event * support asrc<->sai<->wm8960 mode Signed-off-by: Zidan Wang --- ..

Re: [alsa-devel] [PATCH] ASoC: fsl_spdif: Don't try to round-up for clock divisor calculation

2015-05-26 Thread Zidan Wang
So i used the imx7 board and test it with internal branch. I found that (txclk_df + 1) is better than txclk_df. I suspect the patch for clk_round_rate() is not in our branch. Could you please tell me which patch is for clk_round_rate? I want to cherry-pick it to our branch and test it

[alsa-devel][PATCH v2 3/3] ASoC: fsl_sai: add 12kHz, 24kHz, 176.4kHz and 192kHz sample rate support

2015-05-13 Thread Zidan Wang
Normally we don't support 12kHz, 24kHz in audio driver, alsa didn't have formal definition of 12kHz, 24kHz, but alsa supply a way to support these sample rates. And add 176.4kHz and 192kHz support. Signed-off-by: Zidan Wang Signed-off-by: Mark Brown --- sound/soc/fsl/fsl_

[alsa-devel][PATCH v2 2/3] ASoC: fsl_sai: add tdm slots operation support

2015-05-13 Thread Zidan Wang
unused BCLK cycles before each LRCLK transition. Signed-off-by: Zidan Wang --- sound/soc/fsl/fsl_sai.c | 34 -- sound/soc/fsl/fsl_sai.h | 3 +++ 2 files changed, 31 insertions(+), 6 deletions(-) diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c index

[alsa-devel][PATCH v2 1/3] ASoC: fsl_sai: add sai master mode support

2015-05-13 Thread Zidan Wang
hw_free() to disable the mclk. Signed-off-by: Zidan Wang Signed-off-by: Mark Brown --- sound/soc/fsl/fsl_sai.c | 117 ++-- sound/soc/fsl/fsl_sai.h | 9 +++- 2 files changed, 121 insertions(+), 5 deletions(-) diff --git a/sound/soc/fsl/fsl_sai.c b/sound

[alsa-devel][PATCH 3/4] ASoC: wm8960: fix "RINPUT3" audio route error

2015-05-12 Thread Zidan Wang
It should be "RINPUT3" instead of "LINPUT3" route to "Right Input Mixer". Signed-off-by: Zidan Wang --- sound/soc/codecs/wm8960.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c index 2559e

[alsa-devel][PATCH 1/4] ASoC: wm8960: Let wm8960 driver configure its bit clock and frame clock

2015-05-12 Thread Zidan Wang
wm8960 codec driver missing configure its bit clock and frame clock for codec master mode, so add support for it. It will calculate a appropriate frequency dividing ratio according to the system clock, bit clock and frame clock, then set the corresponding registers. Signed-off-by: Zidan Wang

[alsa-devel][PATCH 2/3] ASoC: fsl_sai: Add tdm slots operation for SAI master mode

2015-05-12 Thread Zidan Wang
unused BCLK cycles before each LRCLK transition. Signed-off-by: Zidan Wang --- sound/soc/fsl/fsl_sai.c | 28 ++-- sound/soc/fsl/fsl_sai.h | 3 +++ 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c index

[alsa-devel][PATCH 3/3] ASoC: fsl_sai: add 12kHz, 24kHz, 176.4kHz and 192kHz sample rate support

2015-05-12 Thread Zidan Wang
Normally we don't support 12kHz, 24kHz in audio driver, alsa didn't have formal definition of 12kHz, 24kHz, but alsa supply a way to support these sample rates. And add 176.4kHz and 192kHz support. Signed-off-by: Zidan Wang --- sound/soc/fsl/fsl_sai.c | 24 +-

[alsa-devel][PATCH 1/3] ASoC: fsl_sai: add sai master mode support

2015-05-12 Thread Zidan Wang
hw_free() to disable the mclk. Signed-off-by: Zidan Wang --- sound/soc/fsl/fsl_sai.c | 117 ++-- sound/soc/fsl/fsl_sai.h | 9 +++- 2 files changed, 121 insertions(+), 5 deletions(-) diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c index

[alsa-devel][PATCH 4/4] ASoC: wm8958: correct BCLK DIV 348 to 384

2015-05-11 Thread Zidan Wang
According to the RM of wm8958, BCLK DIV 348 doesn't exist, correct it to 384. Signed-off-by: Zidan Wang --- sound/soc/codecs/wm8994.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index 2d32b54..33bf663 100644

[alsa-devel][PATCH 2/4] ASoC: wm8960: add 32 bit word length support

2015-05-11 Thread Zidan Wang
According to referance manual, right justify mode can't support 32 bit word length. Signed-off-by: Zidan Wang --- sound/soc/codecs/wm8960.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c index b072501..25

[PATCH 0/3] Add sai master mode, tdm slot operation and add some sample rate support

2015-05-11 Thread Zidan Wang
Add SAI master mode support. Add tdm slots operation for SAI master mode. Add 12kHz, 24kHz, 176.4kHz and 192kHz sample rate support. Zidan Wang (3): SoC: fsl_sai: add sai master mode support ASoC: fsl_sai: Add tdm slots operation for SAI master mode ASoC: fsl_sai: add 12kHz, 24kHz, 176.4kHz

[PATCH 2/3] ASoC: fsl_sai: Add tdm slots operation for SAI master mode

2015-05-11 Thread Zidan Wang
unused BCLK cycles before each LRCLK transition. Signed-off-by: Zidan Wang --- sound/soc/fsl/fsl_sai.c | 28 ++-- sound/soc/fsl/fsl_sai.h | 3 +++ 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c index

[PATCH 3/3] ASoC: fsl_sai: add 12kHz, 24kHz, 176.4kHz and 192kHz sample rate support

2015-05-11 Thread Zidan Wang
Normally we don't support 12kHz, 24kHz in audio driver, alsa didn't have formal definition of 12kHz, 24kHz, but alsa supply a way to support these sample rates. And add 176.4kHz and 192kHz support. Signed-off-by: Zidan Wang --- sound/soc/fsl/fsl_sai.c | 24 +-

[PATCH 1/3] ASoC: fsl_sai: add sai master mode support

2015-05-11 Thread Zidan Wang
hw_free() to disable the mclk. Signed-off-by: Zidan Wang --- sound/soc/fsl/fsl_sai.c | 117 ++-- sound/soc/fsl/fsl_sai.h | 9 +++- 2 files changed, 121 insertions(+), 5 deletions(-) diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c index

Re: [alsa-devel][PATCH 2/3] ASoC: fsl_sai: Add support for tdm slots operation

2015-01-22 Thread Zidan Wang
On Thu, Jan 22, 2015 at 03:50:20PM -0800, Nicolin Chen wrote: > On Thu, Jan 22, 2015 at 02:20:06PM +0800, Zidan Wang wrote: > > > > > > @@ -369,10 +380,25 @@ static int fsl_sai_hw_params(struct > > > > > > snd_pcm_substream *substream, > > >

Re: [alsa-devel][PATCH 2/3] ASoC: fsl_sai: Add support for tdm slots operation

2015-01-21 Thread Zidan Wang
On Wed, Jan 21, 2015 at 09:44:10PM -0800, Nicolin Chen wrote: > On Thu, Jan 22, 2015 at 12:55:35PM +0800, Zidan Wang wrote: > > On Wed, Jan 21, 2015 at 10:08:03AM -0800, Nicolin Chen wrote: > > > On Tue, Jan 20, 2015 at 08:21:19PM +0800, Zidan Wang wrote: > > > > @@

Re: [alsa-devel][PATCH 3/3] ASoC: fsl_sai: Add support for Right-J mode

2015-01-21 Thread Zidan Wang
On Wed, Jan 21, 2015 at 10:53:20AM -0800, Nicolin Chen wrote: > On Tue, Jan 20, 2015 at 08:21:20PM +0800, Zidan Wang wrote: > > Add Right-J mode and set TCR5 FBT bit to let data right justify. > > > > Signed-off-by: Zidan Wang > > > - if (sai->is_lsb_fir

Re: [alsa-devel][PATCH 2/3] ASoC: fsl_sai: Add support for tdm slots operation

2015-01-21 Thread Zidan Wang
On Wed, Jan 21, 2015 at 10:08:03AM -0800, Nicolin Chen wrote: > On Tue, Jan 20, 2015 at 08:21:19PM +0800, Zidan Wang wrote: > > @@ -369,10 +380,25 @@ static int fsl_sai_hw_params(struct snd_pcm_substream > > *substream, > > u32 word_width = snd_pcm_format_width

Re: [alsa-devel][PATCH 1/3] SoC: fsl_sai: add sai master mode support

2015-01-21 Thread Zidan Wang
On Tue, Jan 20, 2015 at 10:07:03PM -0800, Nicolin Chen wrote: > On Tue, Jan 20, 2015 at 08:21:18PM +0800, Zidan Wang wrote: > > +static int fsl_sai_set_bclk(struct snd_soc_dai *dai, bool tx, u32 freq) > > > + if ((tx && sai->synchronous[TX]) ||

[alsa-devel][PATCH 3/3] ASoC: fsl_sai: Add support for Right-J mode

2015-01-20 Thread Zidan Wang
Add Right-J mode and set TCR5 FBT bit to let data right justify. Signed-off-by: Zidan Wang --- sound/soc/fsl/fsl_sai.c | 14 +++--- sound/soc/fsl/fsl_sai.h | 1 + 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c index

[alsa-devel][PATCH 0/3] Add master mode, tmd and right-j mode support

2015-01-20 Thread Zidan Wang
Add sai master mode support. Add tdm slots support. Add Right-J mode support. Zidan Wang (3): SoC: fsl_sai: add sai master mode support ASoC: fsl_sai: Add support for tdm slots operation ASoC: fsl_sai: Add support for Right-J mode sound/soc/fsl/fsl_sai.c | 164

[alsa-devel][PATCH 2/3] ASoC: fsl_sai: Add support for tdm slots operation

2015-01-20 Thread Zidan Wang
TCR2 WNW bit to slot width and TCR4 FRSZ bit to slots * channels to configure frame Length. And it is no need to set TCR4 SYWD to set frame sync length for sai slave mode, so just do it when it is sai master mode. Signed-off-by: Zidan Wang --- sound/soc/fsl/fsl_sai.c | 46

[alsa-devel][PATCH 1/3] SoC: fsl_sai: add sai master mode support

2015-01-20 Thread Zidan Wang
hw_free() to disable the mclk. Signed-off-by: Zidan Wang --- sound/soc/fsl/fsl_sai.c | 110 +++- sound/soc/fsl/fsl_sai.h | 9 +++- 2 files changed, 115 insertions(+), 4 deletions(-) diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c index

Re: [alsa-devel][PATCH v2 2/2] ASoC: wm8960: Let wm8960 driver configure its bit clock and frame clock

2015-01-15 Thread Zidan Wang
On Wed, Jan 14, 2015 at 07:27:03PM +, Mark Brown wrote: > On Wed, Jan 07, 2015 at 03:31:45PM +0800, Zidan Wang wrote: > > > + for (i = 0; i < ARRAY_SIZE(dac_divs); ++i) { > > + if (wm8960->sysclk == lrclk * dac_divs[i]) { > > +

[alsa-devel][PATCH v2 2/2] ASoC: wm8960: Let wm8960 driver configure its bit clock and frame clock

2015-01-07 Thread Zidan Wang
From: Zidan Wang wm8960 codec driver missing configure its bit clock and frame clock, so add support for it. It will calculate a appropriate frequency dividing ratio according to the system clock, bit clock and frame clock, then set the corresponding registers. Signed-off-by: Zidan Wang

[alsa-devel][PATCH v2 1/2] ASoC: wm8960: Let wm8960 codec driver manage its own MCLK

2015-01-06 Thread Zidan Wang
From: Zidan Wang When we want to use wm8960 codec, we should enable its MCLK in machine driver. It's reasonable for wm8960 codec driver to manage its own MCLK. When current bias_level is SND_SOC_BIAS_ON, it is preparing for a transition away from ON. In this case, disable the codec mclk.

[alsa-devel][PATCH 1/4] ASoC: wm8960: Let wm8960 codec driver manage its own MCLK

2014-12-30 Thread Zidan Wang
level is not SND_SOC_BIAS_ON, it preparing for a transition to ON. In this case, enable the codec mclk. Signed-off-by: Zidan Wang --- sound/soc/codecs/wm8960.c | 40 +++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/wm8960.c b/

[alsa-devel][PATCH 3/4] ASoC: wm8960: use pr_debug instead of pr_err

2014-12-30 Thread Zidan Wang
don't generate much error logs. Signed-off-by: Zidan Wang --- sound/soc/codecs/wm8960.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c index 86a5489..cb42385 100644 --- a/sound/soc/codecs/wm8960.c +++ b/sound/soc/c

[alsa-devel][PATCH 4/4] ASoC: wm8960: Fix capture sample rate from 11250 to 11025

2014-12-30 Thread Zidan Wang
wm8960 codec can't support sample rate 11250, it must be 11025. Signed-off-by: Zidan Wang --- sound/soc/codecs/wm8960.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c index cb42385..68790f1 100644 --- a/sound/soc/c

[alsa-devel][PATCH 2/4] ASoC: wm8960: Let wm8960 driver configure its bit clock and frame clock

2014-12-30 Thread Zidan Wang
wm8960 codec driver missing configure its bit clock and frame clock, so add support for it. It will calculate a appropriate frequency dividing ratio according to the system clock, bit clock and frame clock, then set the corresponding registers. Signed-off-by: Zidan Wang --- sound/soc/codecs

Re: [alsa-devel][PATCH v4] ASoC: wm8960: Let wm8960 codec driver manage its own MCLK

2014-12-29 Thread Zidan Wang
On Mon, Dec 29, 2014 at 04:05:14PM +, Mark Brown wrote: > On Mon, Dec 29, 2014 at 10:59:08AM +0000, Zidan Wang wrote: > > Hi Mark, > > Don't top post and please fix your mailer to word wrap within paragraphs > and avoid corrupting the mail it's quoting. >

RE: [alsa-devel][PATCH v4] ASoC: wm8960: Let wm8960 codec driver manage its own MCLK

2014-12-29 Thread Zidan Wang
ckee...@opensource.wolfsonmicro.com; Xiubo Li-B47053; patc...@opensource.wolfsonmicro.com; alsa-de...@alsa-project.org; linux-kernel@vger.kernel.org Subject: Re: [alsa-devel][PATCH v4] ASoC: wm8960: Let wm8960 codec driver manage its own MCLK On Tue, Dec 09, 2014 at 01:45:16PM +0800, Zidan Wang

[alsa-devel][PATCH v4] ASoC: wm8960: Let wm8960 codec driver manage its own MCLK

2014-12-08 Thread Zidan Wang
will triger resume() to enable MCLK. When codec is not being used, it will triger suspend() to disable MCLK. Signed-off-by: Zidan Wang --- sound/soc/codecs/wm8960.c | 46 ++ 1 file changed, 46 insertions(+) diff --git a/sound/soc/codecs/wm8960.c b/soun

RE: [alsa-devel][PATCH v3] ASoC: wm8960: Let wm8960 codec driver manage its own MCLK

2014-12-08 Thread Zidan Wang
wn MCLK On Fri, Dec 05, 2014 at 05:01:56PM +, Charles Keepax wrote: > On Thu, Dec 04, 2014 at 08:41:19PM +0800, Zidan Wang wrote: > > struct wm8960_data { > > + struct clk *mclk; > Is this really pdata? Would the pdata entry to locate the clock not be > a string hol

[alsa-devel][PATCH v3] ASoC: wm8960: Let wm8960 codec driver manage its own MCLK

2014-12-04 Thread Zidan Wang
ntime power management, and auto enable/disable MCLK in pm_runtime resume and suspend. When wm8960 codec is being used, it will triger resume() to enable MCLK. When codec is not being used, it will triger suspend() to disable MCLK. Signed-off-by: Zidan Wang --- include/sound/wm8960.h| 1 + soun

RE: [alsa-devel][PATCH v2] ASoC: wm8960: Let wm8960 codec driver manage its own MCLK

2014-12-04 Thread Zidan Wang
+0800, Zidan Wang wrote: > If we use PLL to generate sysclk, wm8960_set_dai_pll() will enable > PLL. But PLL doesn't power down after using codec. So power down PLL in > suspend(). That would be a bug in the machine driver, the machine driver should be disabling the PLL when it

[alsa-devel][PATCH v2] ASoC: wm8960: Let wm8960 codec driver manage its own MCLK

2014-12-04 Thread Zidan Wang
. But PLL doesn't power down after using codec. So power down PLL in suspend(). Signed-off-by: Zidan Wang --- include/sound/wm8960.h| 1 + sound/soc/codecs/wm8960.c | 59 --- 2 files changed, 57 insertions(+), 3 deletions(-) diff --git a/inc

[alsa-devel][PATCH] ASoC: wm8960: Let wm8960 codec driver manage its own MCLK

2014-12-03 Thread Zidan Wang
will triger resume() to enable MCLK. When codec is not being used, it will triger suspend() to disable MCLK and power down PLL. Signed-off-by: Zidan Wang --- include/sound/wm8960.h| 1 + sound/soc/codecs/wm8960.c | 51 +++ 2 files changed, 52 inser

[alsa-devel][PATCH] ASoC: wm8960: Move register initialisation to I2C driver probe()

2014-11-27 Thread Zidan Wang
We must ensure that the clocking configuration is valid as rapidly as possible. And do software reset before the others registers updates, or the registers will be reset to the default state. Signed-off-by: Zidan Wang --- sound/soc/codecs/wm8960.c | 41

[alsa-devel][PATCH] ASoC: wm8960: LRCM operation should after software reset

2014-11-26 Thread Zidan Wang
When shared_lrclk is set, LRCM will be enabled. But the following software reset in wm8960_probe will reset it to the default state. So LRCM operation should after software reset. Signed-off-by: Zidan Wang --- sound/soc/codecs/wm8960.c | 17 - 1 file changed, 8 insertions(+), 9

[alsa-devel][PATCH v3] ASoC: wm8960: Add device tree support

2014-11-20 Thread Zidan Wang
Document the device tree binding for the WM8960 codec, and modify the driver to extract the platform data from device tree, if present. Signed-off-by: Zidan Wang --- Documentation/devicetree/bindings/sound/wm8960.txt | 31 sound/soc/codecs/wm8960.c | 41

[alsa-devel][PATCH v2 1/2] ASoC: wm8960: Add device tree support

2014-11-20 Thread Zidan Wang
Document the device tree binding for the WM8960 codec, and modify the driver to extract the platform data from device tree, if present. Signed-off-by: Zidan Wang --- Documentation/devicetree/bindings/sound/wm8960.txt | 27 ++ sound/soc/codecs/wm8960.c | 41

[alsa-devel][PATCH v2 2/2] ASoC: wm8960: LRCM operation should after software reset

2014-11-20 Thread Zidan Wang
When shared_lrclk is set, LRCM will be enabled. But the following software reset in wm8960_probe will reset it to the default state. So LRCM operation should after software reset. Signed-off-by: Zidan Wang --- sound/soc/codecs/wm8960.c | 18 -- 1 file changed, 8 insertions

[alsa-devel][PATCH] ASoC: wm8960: Add shared_lrclk and capless to device tree

2014-11-19 Thread Zidan Wang
wm8960_probe will reset it to the default state. So LRCM operation should after software reset. Signed-off-by: Zidan Wang --- sound/soc/codecs/wm8960.c | 49 ++- 1 file changed, 31 insertions(+), 18 deletions(-) diff --git a/sound/soc/codecs/wm8960.c b