[PATCH] ASoC: fsl_sai: Fix one bug for hardware limitation.

2013-12-25 Thread Xiubo Li
This is maybe one bug or a limitation of the hardware that the {T,R}CR2's Synchronous Mode bits must be set as late as possible, or the SAI device maybe hanged up, and there has not any explaination about this limitation in the SAI Data Sheet. Signed-off-by: Xiubo Li --- sound/soc/fsl/fsl_

[PATCH] ASoC: fsl_sai: Add disable operation for the corresponding data channel.

2013-12-24 Thread Xiubo Li
Enables/Disables the corresponding data channel for tx/rx operation. A channel must be enabled before its FIFO is accessed, and then disable it when tx/rx is stopped or idle. Signed-off-by: Xiubo Li --- sound/soc/fsl/fsl_sai.c | 21 + 1 file changed, 13 insertions(+), 8

[PATCH] ASoC: fsl_sai: Move the global registers setting to _dai_probe()

2013-12-24 Thread Xiubo Li
e hareware limitation. Signed-off-by: Xiubo Li --- sound/soc/fsl/fsl_sai.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c index b72132f..596aabb 100644 --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl

[PATCHv2 8/8] Documentation: Add device tree bindings for Freescale VF610 sound.

2013-11-01 Thread Xiubo Li
This adds the Document for Freescale VF610 sound driver under Documentation/devicetree/bindings/sound/. Signed-off-by: Xiubo Li --- .../bindings/sound/fsl_audio_sgt15000_vf610.txt| 46 ++ 1 file changed, 46 insertions(+) create mode 100644 Documentation/devicetree

[PATCHv2 7/8] ARM: dts: Enable SGTL5000 codec based audio driver node for VF610.

2013-11-01 Thread Xiubo Li
This patch add and enable SGTL5000 codec support, and also specified the corresponding SAI node. Signed-off-by: Xiubo Li Signed-off-by: Alison Wang ; + audio-codec = <&codec>; + audio-routing = + "MIC_IN", "Mic Jack"

[PATCHv2 6/8] ASoC: fsl: add SGTL5000 based audio machine driver.

2013-11-01 Thread Xiubo Li
nregister_card(&fsl_sgt1500_card); + + return 0; +} + +static const struct of_device_id fsl_sgtl5000_dt_ids[] = { + { .compatible = "fsl,vf610-sgtl5000", }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(of, fsl_sgtl5000_dt_ids); + +static struct platform_dri

[PATCHv2 4/8] Documentation: Add device tree bindings for Freescale SAI.

2013-11-01 Thread Xiubo Li
This adds the Document for Freescale SAI driver under Documentation/devicetree/bindings/sound/. Signed-off-by: Xiubo Li --- .../devicetree/bindings/sound/fsl-sai.txt | 32 ++ 1 file changed, 32 insertions(+) create mode 100644 Documentation/devicetree/bindings

[PATCHv2 5/8] ASoC: SGTL5000: Enhance the SGTL5000 codec driver about regulator.

2013-11-01 Thread Xiubo Li
On VF610 series there are no regulators used, and now whether the CONFIG_REGULATOR mirco is enabled or not, for the VF610 audio patch series, the board cannot be probe successfully. And this patch will solve this issue. Signed-off-by: Xiubo Li --- sound/soc/codecs/sgtl5000.c | 12

[PATCHv2 3/8] ARM: dts: Enables SAI ALSA SoC DAI device for Vybrid VF610 TOWER board.

2013-11-01 Thread Xiubo Li
This patch add and enable SAI device. Signed-off-by: Xiubo Li --- arch/arm/boot/dts/vf610-twr.dts | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/boot/dts/vf610-twr.dts b/arch/arm/boot/dts/vf610-twr.dts index 1a58678..e4106dd 100644 --- a/arch/arm/boot/dts/vf610-twr.dts +++ b

[PATCHv2 1/8] ALSA: Add SAI SoC Digital Audio Interface driver.

2013-11-01 Thread Xiubo Li
ister(&pdev->dev); + + return 0; +} + +static const struct of_device_id fsl_sai_ids[] = { + { .compatible = "fsl,vf610-sai", }, + { /*sentinel*/ } +}; + +static struct platform_driver fsl_sai_driver = { + .probe = fsl_sai_probe, + .remove = fsl_sai_remove, + +

[PATCHv2 2/8] ARM: dts: Add Freescale SAI ALSA SoC Digital Audio Interface node for VF610.

2013-11-01 Thread Xiubo Li
This patch add the SAI's edma mux Tx and Rx support. Signed-off-by: Jingchang Lu Signed-off-by: Xiubo Li --- arch/arm/boot/dts/vf610.dtsi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/vf610.dtsi b/arch/arm/boot/dts/vf610.dtsi index 18e3a4c..39

[no subject]

2013-11-01 Thread Xiubo Li
Hello, This patch series is mostly Freescale's SAI SoC Digital Audio Interface driver implementation. And the implementation is only compatible with device tree definition. This patch series is based on linux-next and has been tested on Vybrid VF610 Tower board using device tree. Changed in

RE: [PATCHv1 1/8] ALSA: Add SAI SoC Digital Audio Interface driver.

2013-10-29 Thread Xiubo Li-B47053
> -Original Message- > From: Chen Guangyu-B42378 > Sent: Tuesday, October 29, 2013 12:02 PM > To: Xiubo Li-B47053 > Cc: Mark Brown; Guo Shawn-R65073; ti...@tabi.org; lgirdw...@gmail.com; > Jin Zhengxiong-R64188; rob.herr...@calxeda.com; pawel.m...@arm.com; > mark.

RE: [PATCHv1 1/8] ALSA: Add SAI SoC Digital Audio Interface driver.

2013-10-28 Thread Xiubo Li-B47053
> > +static struct snd_pcm_hardware snd_fsl_hardware = { > > + .info = SNDRV_PCM_INFO_INTERLEAVED | > > + SNDRV_PCM_INFO_BLOCK_TRANSFER | > > + SNDRV_PCM_INFO_MMAP | > > + SNDRV_PCM_INFO_MMAP_VALID | > > + SNDRV_PCM_INFO_PAUSE | > > + SNDRV_PCM_I

RE: [PATCHv1 1/8] ALSA: Add SAI SoC Digital Audio Interface driver.

2013-10-28 Thread Xiubo Li-B47053
> > +static struct snd_pcm_hardware snd_fsl_hardware = { > > + .info = SNDRV_PCM_INFO_INTERLEAVED | > > + SNDRV_PCM_INFO_BLOCK_TRANSFER | > > + SNDRV_PCM_INFO_MMAP | > > + SNDRV_PCM_INFO_MMAP_VALID | > > + SNDRV_PCM_INFO_PAUSE | > > + SNDRV_PCM_I

RE: [PATCHv1 5/8] ASoC: sgtl5000: Revise the bugs about the sgt15000 codec.

2013-10-27 Thread Xiubo Li-B47053
> > @@ -883,14 +883,19 @@ static int ldo_regulator_register(struct > snd_soc_codec *codec, > > struct regulator_init_data *init_data, > > int voltage) > > { > > +#ifdef CONFIG_SND_SOC_FSL_SGTL5000 > > + return 0; > > +#else > > dev_err(

RE: [alsa-devel] [PATCHv1 1/8] ALSA: Add SAI SoC Digital Audio Interface driver.

2013-10-27 Thread Xiubo Li-B47053
Hi Dan, Vinod, > > +static int fsl_sai_probe(struct platform_device *pdev) { > [...] > > + > > + sai->dma_params_rx.addr = res->start + SAI_RDR; > > + sai->dma_params_rx.maxburst = 6; > > + index = of_property_match_string(np, "dma-names", "rx"); > > + ret = of_parse_phandle_with_args(np,

RE: [alsa-devel] [PATCHv1 1/8] ALSA: Add SAI SoC Digital Audio Interface driver.

2013-10-21 Thread Xiubo Li-B47053
> > +static int fsl_sai_probe(struct platform_device *pdev) { > [...] > > + > > + sai->dma_params_rx.addr = res->start + SAI_RDR; > > + sai->dma_params_rx.maxburst = 6; > > + index = of_property_match_string(np, "dma-names", "rx"); > > + ret = of_parse_phandle_with_args(np, "dmas", "#dma-c

RE: [PATCHv1 6/8] ASoC: fsl: add SGT15000 based audio machine driver.

2013-10-21 Thread Xiubo Li-B47053
> > + ret = snd_soc_register_card(&fsl_sgt1500_card); > > + if (ret) { > > + dev_err(&pdev->dev, "register soc sound card failed :%d\n", > > + ret); > > + return ret; > > + } > > Use the newly added devm_snd_soc_register_card() (in -next). > Oke

RE: [PATCHv1 8/8] Documentation: Add device tree bindings for Freescale VF610 sound.

2013-10-21 Thread Xiubo Li-B47053
> > + -- Power supplies: > > + * Mic Bias > > + > > + -- SGTL5000 pins: > > + * MIC_IN > > + * LINE_IN > > + * HP_OUT > > + * LINE_OUT > > Things that are part of the CODEC should be part of the CODEC binding and > this binding should reference that - this way the information

RE: [alsa-devel] [PATCHv1 1/8] ALSA: Add SAI SoC Digital Audio Interface driver.

2013-10-21 Thread Xiubo Li-B47053
> > +static int fsl_sai_hw_params(struct snd_pcm_substream *substream, > > + struct snd_pcm_hw_params *params, > > + struct snd_soc_dai *cpu_dai) > > +{ > > + int ret; > > + > > + ret = fsl_sai_hw_params_tr(substream, params, cpu_dai, > > + FSL_FMT

RE: [PATCHv1 5/8] ASoC: sgtl5000: Revise the bugs about the sgt15000 codec.

2013-10-20 Thread Xiubo Li-B47053
> > diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c > > index 1f4093f..4e2e4c9 100644 > > --- a/sound/soc/codecs/sgtl5000.c > > +++ b/sound/soc/codecs/sgtl5000.c > > @@ -883,14 +883,19 @@ static int ldo_regulator_register(struct > snd_soc_codec *codec, > >

RE: [PATCHv1 5/8] ASoC: sgtl5000: Revise the bugs about the sgt15000 codec.

2013-10-20 Thread Xiubo Li-B47053
In VF610 board there has not Power Manager module. So if the CONFIG_REGULATOR is turned on the SGTL5000 cannot be brought up correctly. If it's turned off there will also some other errors for the SGTL5000 codec driver using the CONFIG_REGULATOR mirco not very correctly. > > >

RE: [alsa-devel] [PATCHv1 1/8] ALSA: Add SAI SoC Digital Audio Interface driver.

2013-10-18 Thread Xiubo Li-B47053
> > > I understand that, but I'm trying to figure out why of_iomap() is > > > okay for hundreds of other drivers, but not this one. I've used it > > > dozens of times myself, without ever worrying about overlapping > regions. > > > The driver would work fine with just of_iomap(). But the resourc

RE: [PATCHv1 8/8] Documentation: Add device tree bindings for Freescale VF610 sound.

2013-10-18 Thread Xiubo Li-B47053
Hi, > > Documentation/devicetree/bindings/sound/fsl-sgtl5000.txt > > > > diff --git a/Documentation/devicetree/bindings/sound/fsl-sgtl5000.txt > > b/Documentation/devicetree/bindings/sound/fsl-sgtl5000.txt > > new file mode 100644 > > index 000..43e350f > > --- /dev/null > > +++ b/Documentat

RE: [PATCHv1 1/8] ALSA: Add SAI SoC Digital Audio Interface driver.

2013-10-18 Thread Xiubo Li-B47053
Hi, > > + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > > + sai->base = devm_ioremap_resource(&pdev->dev, res); > > + if (IS_ERR(sai->base)) { > > + ret = PTR_ERR(sai->base); > > + return ret; > > > could be: > return PTR_ERR(sai->base); > Yes,Thi

[PATCHv1 8/8] Documentation: Add device tree bindings for Freescale VF610 sound.

2013-10-18 Thread Xiubo Li
This adds the Document for Freescale VF610 sound driver under Documentation/devicetree/bindings/sound/. Signed-off-by: Xiubo Li --- .../devicetree/bindings/sound/fsl-sgtl5000.txt | 52 ++ 1 file changed, 52 insertions(+) create mode 100644 Documentation/devicetree

[PATCHv1 7/8] ARM: dts: Enable SGT15000 codec based audio driver node for VF610.

2013-10-18 Thread Xiubo Li
This patch add and enable SGT15000 codec support, and also specified the corresponding SAI node. Signed-off-by: Xiubo Li Signed-off-by: Alison Wang ; + audio-codec = <&codec>; + audio-routing = + "MIC_IN", "Mic Jack"

[PATCHv1 6/8] ASoC: fsl: add SGT15000 based audio machine driver.

2013-10-18 Thread Xiubo Li
sl_sgt1500_card); + + return 0; +} + +static const struct of_device_id fsl_sgtl5000_dt_ids[] = { + { .compatible = "fsl,vf610-sgtl5000", }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(of, fsl_sgtl5000_dt_ids); + +static struct platform_driver fsl_sgtl5000_driver = { + .driver

[PATCHv1 5/8] ASoC: sgtl5000: Revise the bugs about the sgt15000 codec.

2013-10-18 Thread Xiubo Li
When the CONFIG_REGULATOR is disabled there will be some warnings printed out. Signed-off-by: Xiubo Li --- sound/soc/codecs/sgtl5000.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c index 1f4093f

[PATCHv1 3/8] ARM: dts: Enables SAI ALSA SoC DAI device for Vybrid VF610 TOWER board.

2013-10-18 Thread Xiubo Li
This patch add and enable SAI device. Signed-off-by: Xiubo Li --- arch/arm/boot/dts/vf610-twr.dts | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/boot/dts/vf610-twr.dts b/arch/arm/boot/dts/vf610-twr.dts index 1a58678..e4106dd 100644 --- a/arch/arm/boot/dts/vf610-twr.dts +++ b

[PATCHv1 4/8] Documentation: Add device tree bindings for Freescale SAI.

2013-10-18 Thread Xiubo Li
This adds the Document for Freescale SAI driver under Documentation/devicetree/bindings/sound/. Signed-off-by: Xiubo Li --- .../devicetree/bindings/sound/fsl-sai.txt | 32 ++ 1 file changed, 32 insertions(+) create mode 100644 Documentation/devicetree/bindings

[PATCHv1 2/8] ARM: dts: Add Freescale SAI ALSA SoC Digital Audio Interface node for VF610.

2013-10-18 Thread Xiubo Li
This patch add the SAI's edma mux Tx and Rx support. Signed-off-by: Jingchang Lu Signed-off-by: Xiubo Li --- arch/arm/boot/dts/vf610.dtsi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/vf610.dtsi b/arch/arm/boot/dts/vf610.dtsi index 18e3a4c..39

[PATCHv1 1/8] ALSA: Add SAI SoC Digital Audio Interface driver.

2013-10-18 Thread Xiubo Li
+ return 0; + +out: + snd_soc_unregister_component(&pdev->dev); + return ret; +} + +static int fsl_sai_remove(struct platform_device *pdev) +{ + struct fsl_sai *sai = platform_get_drvdata(pdev); + + fsl_pcm_dma_exit(pdev); + + snd_soc_unregister_component(&pdev->

[PATCHv1 0/8] ALSA: Add SAI driver and enable SGT15000 codec.

2013-10-18 Thread Xiubo Li
This patch series is mostly Freescale's SAI SoC Digital Audio Interface driver implementation. And the implementation is only compatible with device tree definition. This patch series is based on linux-next and has been tested on Vybrid VF610 Tower board using device tree. Added in v1: - Add