Add ESAI & SPDIF Vybird and LS1+ support.
Subsystems (3)
cover Add ESAI & SPDIF Vybird and LS1+ support.
Xiubo Li (4):
ASoC: esai: fix buggy of 'ret' type definition.
ASoC: esai: Add Vybird and LS1+ compatibles support.
ASoC: spdif: Sort the header files alphabetically.
ASoC: spdif: Add Vybird and LS1+ compatibles support.
sound/soc/fsl/fsl_esai.c | 10 +++++++--- sound/soc/fsl/fsl_spdif.c | 10 ++++++---- 2 files changed, 13 insertions(+), 7 deletions(-)
Signature · 1 line
1.8.4
PATCH 1/4 ASoC: esai: fix buggy of 'ret' type definition.
--- sound/soc/fsl/fsl_esai.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
sound/soc/fsl/fsl_esai.c +5 -3
@@ -209,8 +209,9 @@ static int fsl_esai_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id,struct clk *clksrc = esai_priv->extalclk;bool tx = clk_id <=ESAI_HCKT_EXTAL ;bool in = dir ==SND_SOC_CLOCK_IN ; -u32 ret, ratio, ecr =0 ; +u32 ratio, ecr =0 ;unsigned long clk_rate; +int ret;/* sck_div can be only bypassed if ETO/ERO=0 and SNC_SOC_CLOCK_OUT */ esai_priv->sck_div[tx] = true;
@@ -432,8 +433,8 @@ static int fsl_esai_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)static int fsl_esai_startup (struct snd_pcm_substream *substream,struct snd_soc_dai *dai) { -int ret;struct fsl_esai *esai_priv =snd_soc_dai_get_drvdata (dai); +int ret;/* * Some platforms might use the same bit to gate all three or two of
@@ -491,7 +492,8 @@ static int fsl_esai_hw_params(struct snd_pcm_substream *substream,bool tx = substream->stream ==SNDRV_PCM_STREAM_PLAYBACK ;u32 width =snd_pcm_format_width (params_format (params));u32 channels =params_channels (params); -u32 bclk, mask, val, ret; +u32 bclk, mask, val; +int ret; bclk =params_rate (params) * esai_priv->slot_width *2 ;
Signature · 1 line
1.8.4
Re: [PATCH 1/4] ASoC: esai: fix buggy of 'ret' type definition.
Hi Xiubo,
Could you please add some comments to describe where the bug is? If these cause function break on Vybrid or LS1, you should tell people what the root cause exactly is.
Quoted 10 lines · Xiubo Li
Signed-off-by Xiubo Li <[email protected]>--- sound/soc/fsl/fsl_esai.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)sound/soc/fsl/fsl_esai.c +0
-0
sound/soc/fsl/fsl_esai.c static int fsl_esai_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id, · line 214
Quoted 7 lines
sound/soc/fsl/fsl_esai.c +2
-1@@ -209,8 +209,9 @@ static int fsl_esai_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id,struct clk *clksrc = esai_priv->extalclk;bool tx = clk_id <=ESAI_HCKT_EXTAL ;bool in = dir ==SND_SOC_CLOCK_IN ; -u32 ret, ratio, ecr =0 ; +u32 ratio, ecr =0 ;unsigned long clk_rate; +int ret;
Using 'u32' instead of 'int' is just an expediency but not a crucial one. This doesn't make a lot of sense to me.
sound/soc/fsl/fsl_esai.c static int fsl_esai_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt) · line 437
Quoted 10 lines
sound/soc/fsl/fsl_esai.c +1
-1/* sck_div can be only bypassed if ETO/ERO=0 and SNC_SOC_CLOCK_OUT */ esai_priv->sck_div[tx] = true;@@ -432,8 +433,8 @@ static int fsl_esai_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)static int fsl_esai_startup (struct snd_pcm_substream *substream,struct snd_soc_dai *dai) { -int ret;struct fsl_esai *esai_priv =snd_soc_dai_get_drvdata (dai); +int ret;
This looks fine.
Nicolin
Quoted 17 lines
sound/soc/fsl/fsl_esai.c +2
-1/* * Some platforms might use the same bit to gate all three or two of @@ -491,7 +492,8 @@ static int fsl_esai_hw_params(struct snd_pcm_substream *substream,bool tx = substream->stream ==SNDRV_PCM_STREAM_PLAYBACK ;u32 width =snd_pcm_format_width (params_format (params));u32 channels =params_channels (params); -u32 bclk, mask, val, ret; +u32 bclk, mask, val; +int ret; bclk =params_rate (params) * esai_priv->slot_width *2 ;Signature · 1 line
1.8.4
PATCH 2/4 ASoC: esai: Add Vybird and LS1+ compatibles support.
In reply to Xiubo Li--- sound/soc/fsl/fsl_esai.c | 2 ++ 1 file changed, 2 insertions(+)
sound/soc/fsl/fsl_esai.c +2 -0
@@ -818,6 +818,8 @@ static int fsl_esai_probe(struct platform_device *pdev)static const struct of_device_id fsl_esai_dt_ids[] = { { .compatible ="fsl,imx35-esai" , }, + { .compatible ="fsl,vybird-esai" , }, + { .compatible ="fsl,ls1+-esai" , }, {} };MODULE_DEVICE_TABLE (of, fsl_esai_dt_ids);
Signature · 1 line
1.8.4
Re: [PATCH 2/4] ASoC: esai: Add Vybird and LS1+ compatibles support.
Quoted 10 lines · Xiubo Li
Signed-off-by Xiubo Li <[email protected]>--- sound/soc/fsl/fsl_esai.c | 2 ++ 1 file changed, 2 insertions(+)sound/soc/fsl/fsl_esai.c +0
-0
sound/soc/fsl/fsl_esai.c static int fsl_esai_probe(struct platform_device *pdev) · line 821
Quoted 4 lines
sound/soc/fsl/fsl_esai.c +1
-0@@ -818,6 +818,8 @@ static int fsl_esai_probe(struct platform_device *pdev)static const struct of_device_id fsl_esai_dt_ids[] = { { .compatible ="fsl,imx35-esai" , }, + { .compatible ="fsl,vybird-esai" , },
vybird or vybrid?
sound/soc/fsl/fsl_esai.c static int fsl_esai_probe(struct platform_device *pdev) · line 822
Quoted 1 line
sound/soc/fsl/fsl_esai.c +1
-0+ { .compatible = "fsl,ls1+-esai", },
Does ls1 differ vybrid on esai part? If not, it should be enough to use vybrid for both of them, just like imx6q and imx6dl can also use imx35 compatible.
Thanks,
Nicolin
Quoted 7 lines
sound/soc/fsl/fsl_esai.c +0
-0{} };MODULE_DEVICE_TABLE (of, fsl_esai_dt_ids);Signature · 1 line
1.8.4
Re: [PATCH 2/4] ASoC: esai: Add Vybird and LS1+ compatibles support.
Quoted 21 lines
Subject: Re: [PATCH 2/4] ASoC: esai: Add Vybird and LS1+ compatibles support.
Quoted 10 lines · Xiubo Li
Signed-off-by Xiubo Li <[email protected]>--- sound/soc/fsl/fsl_esai.c | 2 ++ 1 file changed, 2 insertions(+)sound/soc/fsl/fsl_esai.c +0
-0sound/soc/fsl/fsl_esai.c static int fsl_esai_probe(struct platform_device *pdev) · line 821
Quoted 4 lines
sound/soc/fsl/fsl_esai.c +1
-0@@ -818,6 +818,8 @@ static int fsl_esai_probe(struct platform_device *pdev)static const struct of_device_id fsl_esai_dt_ids[] = { { .compatible ="fsl,imx35-esai" , }, + { .compatible ="fsl,vybird-esai" , },vybird or vybrid?
Quoted 6 lines
sound/soc/fsl/fsl_esai.c static int fsl_esai_probe(struct platform_device *pdev) · line 822
Quoted 1 line
sound/soc/fsl/fsl_esai.c +1
-0+ { .compatible = "fsl,ls1+-esai", },Does ls1 differ vybrid on esai part? If not, it should be enough to use vybrid for both of them, just like imx6q and imx6dl can also use imx35 compatible.
Just like the imx series as you described, and that looks nice.
Thanks,
Quoted 10 lines
Thanks,
NicolinQuoted 7 lines
sound/soc/fsl/fsl_esai.c +0
-1{} };MODULE_DEVICE_TABLE (of, fsl_esai_dt_ids); --1.8.4
PATCH 3/4 ASoC: spdif: Sort the header files alphabetically.
In reply to Xiubo Li--- sound/soc/fsl/fsl_spdif.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
sound/soc/fsl/fsl_spdif.c +4 -4
@@ -13,18 +13,18 @@* kind, whether express or implied. */ -#include <linux/module.h> +#include <linux/bitrev.h> #include <linux/clk.h> #include <linux/clk-private.h> -#include <linux/bitrev.h> -#include <linux/regmap.h> +#include <linux/module.h> #include <linux/of_address.h> #include <linux/of_device.h> #include <linux/of_irq.h> +#include <linux/regmap.h> #include <sound/asoundef.h> -#include <sound/soc.h> #include <sound/dmaengine_pcm.h> +#include <sound/soc.h> #include "fsl_spdif.h" #include "imx-pcm.h"
Signature · 1 line
1.8.4
Re: [PATCH 3/4] ASoC: spdif: Sort the header files alphabetically.
Quoted 1 line · Xiubo Li
Signed-off-by Xiubo Li <[email protected]>
Thank you.
Quoted 35 lines
--- sound/soc/fsl/fsl_spdif.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)sound/soc/fsl/fsl_spdif.c +4
-4@@ -13,18 +13,18 @@* kind, whether express or implied. */ -#include <linux/module.h> +#include <linux/bitrev.h> #include <linux/clk.h> #include <linux/clk-private.h> -#include <linux/bitrev.h> -#include <linux/regmap.h> +#include <linux/module.h> #include <linux/of_address.h> #include <linux/of_device.h> #include <linux/of_irq.h> +#include <linux/regmap.h> #include <sound/asoundef.h> -#include <sound/soc.h> #include <sound/dmaengine_pcm.h> +#include <sound/soc.h> #include "fsl_spdif.h" #include "imx-pcm.h" Signature · 1 line
1.8.4
PATCH 4/4 ASoC: spdif: Add Vybird and LS1+ compatibles support.
In reply to Xiubo Li--- sound/soc/fsl/fsl_spdif.c | 2 ++ 1 file changed, 2 insertions(+)
sound/soc/fsl/fsl_spdif.c +2 -0
@@ -1186,6 +1186,8 @@ static int fsl_spdif_probe(struct platform_device *pdev)static const struct of_device_id fsl_spdif_dt_ids[] = { { .compatible ="fsl,imx35-spdif" , }, + { .compatible ="fsl,vybird-spdif" , }, + { .compatible ="fsl,ls1+-spdif" , }, {} };MODULE_DEVICE_TABLE (of, fsl_spdif_dt_ids);
Signature · 1 line
1.8.4
Re: [PATCH 4/4] ASoC: spdif: Add Vybird and LS1+ compatibles support.
Quoted 10 lines · Xiubo Li
Signed-off-by Xiubo Li <[email protected]>--- sound/soc/fsl/fsl_spdif.c | 2 ++ 1 file changed, 2 insertions(+)sound/soc/fsl/fsl_spdif.c +0
-0
sound/soc/fsl/fsl_spdif.c static int fsl_spdif_probe(struct platform_device *pdev) · line 1190
Quoted 5 lines
sound/soc/fsl/fsl_spdif.c +2
-0@@ -1186,6 +1186,8 @@ static int fsl_spdif_probe(struct platform_device *pdev)static const struct of_device_id fsl_spdif_dt_ids[] = { { .compatible ="fsl,imx35-spdif" , }, + { .compatible ="fsl,vybird-spdif" , }, + { .compatible ="fsl,ls1+-spdif" , },
Same comments here.
And just a little reminder:
You are using "fsl,vf610-sai" for fsl_sai.c. I was wondering if you'd better use "fsl,vf610-spdif" over here as well.
Best regards,
Nicolin
Quoted 7 lines
sound/soc/fsl/fsl_spdif.c +0
-0{} };MODULE_DEVICE_TABLE (of, fsl_spdif_dt_ids);Signature · 1 line
1.8.4
Re: [PATCH 4/4] ASoC: spdif: Add Vybird and LS1+ compatibles support.
Quoted 23 lines
Subject: Re: [PATCH 4/4] ASoC: spdif: Add Vybird and LS1+ compatibles support.
sound/soc/fsl/fsl_spdif.c static int fsl_spdif_probe(struct platform_device
Quoted 10 lines · Xiubo Li
Signed-off-by Xiubo Li <[email protected]>--- sound/soc/fsl/fsl_spdif.c | 2 ++ 1 file changed, 2 insertions(+)sound/soc/fsl/fsl_spdif.c +0
-0@@ -1186,6 +1186,8 @@ static int fsl_spdif_probe(struct platform_device*pdev)
sound/soc/fsl/fsl_spdif.c static int fsl_spdif_probe(struct platform_device *pdev) · line 1190
Quoted 5 lines
sound/soc/fsl/fsl_spdif.c +2
-0static const struct of_device_id fsl_spdif_dt_ids[] = { { .compatible ="fsl,imx35-spdif" , }, + { .compatible ="fsl,vybird-spdif" , }, + { .compatible ="fsl,ls1+-spdif" , },Same comments here.
Quoted 4 lines
And just a little reminder:
You are using "fsl,vf610-sai" forfsl_sai.c. I was wondering if you'd better use "fsl,vf610-spdif" over here as well.
Please see the next version.
Thanks,
BRs
Xiubo
Quoted 10 lines
Best regards,
NicolinQuoted 7 lines
sound/soc/fsl/fsl_spdif.c +0
-1{} };MODULE_DEVICE_TABLE (of, fsl_spdif_dt_ids); --1.8.4
Fabio Estevam
reviewerRe: [PATCH 4/4] ASoC: spdif: Add Vybird and LS1+ compatibles support.
In reply to Xiubo LiQuoted 10 lines · Xiubo Li
Signed-off-by Xiubo Li <[email protected]>--- sound/soc/fsl/fsl_spdif.c | 2 ++ 1 file changed, 2 insertions(+)sound/soc/fsl/fsl_spdif.c +0
-0
sound/soc/fsl/fsl_spdif.c static int fsl_spdif_probe(struct platform_device *pdev) · line 1189
Quoted 4 lines
sound/soc/fsl/fsl_spdif.c +1
-0@@ -1186,6 +1186,8 @@ static int fsl_spdif_probe(struct platform_device *pdev)static const struct of_device_id fsl_spdif_dt_ids[] = { { .compatible ="fsl,imx35-spdif" , }, + { .compatible ="fsl,vybird-spdif" , },
I think you mean vybrid ;-)
Re: [PATCH 4/4] ASoC: spdif: Add Vybird and LS1+ compatibles support.
Quoted 16 lines
Subject: Re: [alsa-devel] [PATCH 4/4] ASoC: spdif: Add Vybird and LS1+ compatibles support.
sound/soc/fsl/fsl_spdif.c static int fsl_spdif_probe(struct platform_device
Quoted 10 lines · Xiubo Li
Signed-off-by Xiubo Li <[email protected]>--- sound/soc/fsl/fsl_spdif.c | 2 ++ 1 file changed, 2 insertions(+)sound/soc/fsl/fsl_spdif.c +0
-0@@ -1186,6 +1186,8 @@ static int fsl_spdif_probe(struct platform_device*pdev)
Quoted 1 line
Quoted 6 lines
Quoted 3 lines
static const struct of_device_id fsl_spdif_dt_ids[] = { { .compatible = "fsl,imx35-spdif", },+ { .compatible = "fsl,vybird-spdif", },
I think you mean vybrid ;-)
Well yes, you are right.
I will follow GuangYu's advice in another mail.
Thanks,
Brs
Xiubo