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
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
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
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
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
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
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:
> > > >
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
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
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.
> >
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.
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
>
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
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
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.
> > >
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
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
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
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
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
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
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
---
..
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
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_
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
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
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
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
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
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 +-
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
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
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
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
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
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 +-
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
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,
> > >
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:
> > > > @@
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
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
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]) ||
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
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
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
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
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]) {
> > +
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
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.
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/
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
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
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
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.
>
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
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
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
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
+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
. 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
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
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
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
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
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
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
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
67 matches
Mail list logo