[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 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 zidan.w...@freescale.com --- 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

[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 zidan.w

[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 zidan.w

[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 zidan.w

[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 zidan.w

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

2015-07-03 Thread Zidan Wang
. 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 | 256

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

2015-07-03 Thread Zidan Wang
. 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 zidan.w...@freescale.com --- sound/soc/codecs/wm8960.c | 256

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-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: When using snd_soc_dai_set_pll to set

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

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, otherwise set pll will be failed. In order

[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

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

2015-06-26 Thread Zidan Wang
freq and set the pll again. Signed-off-by: Zidan Wang zidan.w...@freescale.com --- 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

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 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. In default, the left ADC

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-16 Thread Zidan Wang
, the 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 v2] ASoC: wm8960: add dapm kcontrols to select left/right ADC input source

2015-06-16 Thread Zidan Wang
, the left(right) input path will be powered down. Signed-off-by: Zidan Wang zidan.w...@freescale.com --- 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

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 and enable the headphone

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. So no need to move mclk enable

[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

[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 zidan.w...@freescale.com --- sound/soc/codecs/wm8960.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/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-12 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

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. * support codec master and slave mode * support headphone jack

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

2015-06-12 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 playback a wav. 2. stop playback

[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 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 zidan.w...@freescale.com --- Documentation/devicetree/bindings/sound/wm8960.txt | 11

[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 zidan.w...@freescale.com --- 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

[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 zidan.w...@freescale.com --- 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

[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 zidan.w

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 * support headphone jack detect

[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 --- ..

[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 zidan.w...@freescale.com

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

2015-05-26 Thread Zidan Wang
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. Best Regards, Zid

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

2015-05-26 Thread Zidan Wang
() 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. Best Regards, Zidan Wang -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More

[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_sai.c | 24

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

2015-05-13 Thread Zidan Wang
be 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 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 zidan.w...@freescale.com Signed-off-by: Mark Brown broo...@kernel.org --- sound/soc/fsl/fsl_sai.c | 117 ++-- sound/soc/fsl/fsl_sai.h | 9 +++- 2 files changed, 121 insertions(+), 5 deletions

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

2015-05-13 Thread Zidan Wang
be unused BCLK cycles before each LRCLK transition. Signed-off-by: Zidan Wang zidan.w...@freescale.com --- 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

[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 zidan.w...@freescale.com Signed-off-by: Mark Brown broo...@kernel.org

[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
be 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 +--- 1 file

[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-12 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-12 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..2559e31

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

2015-05-12 Thread Zidan Wang
According to referance manual, right justify mode can't support 32 bit word length. Signed-off-by: Zidan Wang zidan.w...@freescale.com --- 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

[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 zidan.w...@freescale.com --- 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 2559e31..4ab1607

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

2015-05-12 Thread Zidan Wang
According to the RM of wm8958, BCLK DIV 348 doesn't exist, correct it to 384. Signed-off-by: Zidan Wang zidan.w...@freescale.com --- 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

[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 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 zidan.w...@freescale.com --- 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 zidan.w...@freescale.com --- 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

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

2015-05-12 Thread Zidan Wang
be unused BCLK cycles before each LRCLK transition. Signed-off-by: Zidan Wang zidan.w...@freescale.com --- 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

[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
be 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 +--- 1 file

[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

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

2015-05-11 Thread Zidan Wang
be unused BCLK cycles before each LRCLK transition. Signed-off-by: Zidan Wang zidan.w...@freescale.com --- 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

[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 zidan.w...@freescale.com --- 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 zidan.w...@freescale.com --- 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

[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

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-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, u32 word_width = snd_pcm_format_width(params_format(params

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]) ||

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 zidan.w...@freescale.com - if (sai-is_lsb_first) + if (sai

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(params_format(params)); u32

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: @@ -369,10 +380,25 @@ static int

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]) || (!tx !sai-synchronous[RX

[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

[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 zidan.w...@freescale.com --- sound/soc/fsl/fsl_sai.c | 46

[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 zidan.w...@freescale.com --- 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

[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 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 zidan.w...@freescale.com --- 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

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]) { > > +

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]) { + for (j = 0; j ARRAY_SIZE(bclk_divs); ++j

[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 2/2] ASoC: wm8960: Let wm8960 driver configure its bit clock and frame clock

2015-01-07 Thread Zidan Wang
From: Zidan Wang b50...@freescale.com 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

[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. When

[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 b50...@freescale.com 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

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

2014-12-30 Thread Zidan Wang
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/sound

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

2014-12-30 Thread Zidan Wang
that 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/codecs

  1   2   >