diff mbox

[v2,1/3] ARM: shmobile: armadillo800eva: Properly specify HDMI audio link format

Message ID 1421847492-8857-1-git-send-email-lars@metafoo.de (mailing list archive)
State Rejected
Delegated to: Simon Horman
Headers show

Commit Message

Lars-Peter Clausen Jan. 21, 2015, 1:38 p.m. UTC
The DAI link format should be specified for the whole link rather than just
one component on the link. So move the format specification for the HDMI
audio link from the CPU component to the link itself.

Since the sh-mobile-hdmi DAI driver doesn't implement the set_fmt() callback
in this case there is no functional difference between only specifying the
the format for the CPU side or for the whole link, but the later it will
allow us to remove support for just specifying the format for one component.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
No changes since v1.
---
 arch/arm/mach-shmobile/board-armadillo800eva.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Simon Horman Jan. 27, 2015, 12:58 a.m. UTC | #1
On Wed, Jan 21, 2015 at 02:38:10PM +0100, Lars-Peter Clausen wrote:
> The DAI link format should be specified for the whole link rather than just
> one component on the link. So move the format specification for the HDMI
> audio link from the CPU component to the link itself.
> 
> Since the sh-mobile-hdmi DAI driver doesn't implement the set_fmt() callback
> in this case there is no functional difference between only specifying the
> the format for the CPU side or for the whole link, but the later it will
> allow us to remove support for just specifying the format for one component.
> 
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> ---
> No changes since v1.

Morimoto-san,

could you provide a review of this patch?

> ---
>  arch/arm/mach-shmobile/board-armadillo800eva.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c
> index 6d949f1..75de26c 100644
> --- a/arch/arm/mach-shmobile/board-armadillo800eva.c
> +++ b/arch/arm/mach-shmobile/board-armadillo800eva.c
> @@ -1040,9 +1040,9 @@ static struct asoc_simple_card_info fsi2_hdmi_info = {
>  	.card		= "FSI2B-HDMI",
>  	.codec		= "sh-mobile-hdmi",
>  	.platform	= "sh_fsi2",
> +	.daifmt		= SND_SOC_DAIFMT_CBS_CFS,
>  	.cpu_dai = {
>  		.name	= "fsib-dai",
> -		.fmt	= SND_SOC_DAIFMT_CBS_CFS,
>  	},
>  	.codec_dai = {
>  		.name = "sh_mobile_hdmi-hifi",
> -- 
> 1.8.0
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Kuninori Morimoto Jan. 27, 2015, 7:40 a.m. UTC | #2
Hi Lars

Thank you for your patch

> The DAI link format should be specified for the whole link rather than just
> one component on the link. So move the format specification for the HDMI
> audio link from the CPU component to the link itself.
> 
> Since the sh-mobile-hdmi DAI driver doesn't implement the set_fmt() callback
> in this case there is no functional difference between only specifying the
> the format for the CPU side or for the whole link, but the later it will
> allow us to remove support for just specifying the format for one component.
> 
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> ---
> No changes since v1.
> ---
>  arch/arm/mach-shmobile/board-armadillo800eva.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c
> index 6d949f1..75de26c 100644
> --- a/arch/arm/mach-shmobile/board-armadillo800eva.c
> +++ b/arch/arm/mach-shmobile/board-armadillo800eva.c
> @@ -1040,9 +1040,9 @@ static struct asoc_simple_card_info fsi2_hdmi_info = {
>  	.card		= "FSI2B-HDMI",
>  	.codec		= "sh-mobile-hdmi",
>  	.platform	= "sh_fsi2",
> +	.daifmt		= SND_SOC_DAIFMT_CBS_CFS,
>  	.cpu_dai = {
>  		.name	= "fsib-dai",
> -		.fmt	= SND_SOC_DAIFMT_CBS_CFS,
>  	},
>  	.codec_dai = {
>  		.name = "sh_mobile_hdmi-hifi",

I guess if you want to use common .daifmt, it should be same as "codec" side.
(cpu side "S" means, codec / daifmt side "M")
So, this mean above should be

@@ -1040,9 +1040,9 @@ static struct asoc_simple_card_info fsi2_hdmi_info = {
 	.card		= "FSI2B-HDMI",
 	.codec		= "sh-mobile-hdmi",
 	.platform	= "sh_fsi2",
+	.daifmt		= SND_SOC_DAIFMT_CBM_CFM,   <=
 	.cpu_dai = {
		.name	= "fsib-dai",
-		.fmt	= SND_SOC_DAIFMT_CBS_CFS,
 	},

c7a507eea1db1430476289f525f9c853d5d485e8
(ASoC: fsi: fixup SND_SOC_DAIFMT_CBx_CFx flags)
can be good example ?
(I wonder what happen on armadillo800eva ?)

Best regards
---
Kuninori Morimoto
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Lars-Peter Clausen Jan. 27, 2015, 8:19 a.m. UTC | #3
On 01/27/2015 08:40 AM, Kuninori Morimoto wrote:
>
> Hi Lars
>
> Thank you for your patch
>
>> The DAI link format should be specified for the whole link rather than just
>> one component on the link. So move the format specification for the HDMI
>> audio link from the CPU component to the link itself.
>>
>> Since the sh-mobile-hdmi DAI driver doesn't implement the set_fmt() callback
>> in this case there is no functional difference between only specifying the
>> the format for the CPU side or for the whole link, but the later it will
>> allow us to remove support for just specifying the format for one component.
>>
>> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
>> ---
>> No changes since v1.
>> ---
>>   arch/arm/mach-shmobile/board-armadillo800eva.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c
>> index 6d949f1..75de26c 100644
>> --- a/arch/arm/mach-shmobile/board-armadillo800eva.c
>> +++ b/arch/arm/mach-shmobile/board-armadillo800eva.c
>> @@ -1040,9 +1040,9 @@ static struct asoc_simple_card_info fsi2_hdmi_info = {
>>   	.card		= "FSI2B-HDMI",
>>   	.codec		= "sh-mobile-hdmi",
>>   	.platform	= "sh_fsi2",
>> +	.daifmt		= SND_SOC_DAIFMT_CBS_CFS,
>>   	.cpu_dai = {
>>   		.name	= "fsib-dai",
>> -		.fmt	= SND_SOC_DAIFMT_CBS_CFS,
>>   	},
>>   	.codec_dai = {
>>   		.name = "sh_mobile_hdmi-hifi",
>
> I guess if you want to use common .daifmt, it should be same as "codec" side.
> (cpu side "S" means, codec / daifmt side "M")
> So, this mean above should be
>
> @@ -1040,9 +1040,9 @@ static struct asoc_simple_card_info fsi2_hdmi_info = {
>   	.card		= "FSI2B-HDMI",
>   	.codec		= "sh-mobile-hdmi",
>   	.platform	= "sh_fsi2",
> +	.daifmt		= SND_SOC_DAIFMT_CBM_CFM,   <=
>   	.cpu_dai = {
> 		.name	= "fsib-dai",
> -		.fmt	= SND_SOC_DAIFMT_CBS_CFS,
>   	},

Right now the CPU is configured as master, with your proposed change it 
would be configured as slave. These flags are always from the CODEC's 
perspective.
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Kuninori Morimoto Jan. 27, 2015, 11:52 p.m. UTC | #4
Hi Lars

> > I guess if you want to use common .daifmt, it should be same as "codec" side.
> > (cpu side "S" means, codec / daifmt side "M")
> > So, this mean above should be
> >
> > @@ -1040,9 +1040,9 @@ static struct asoc_simple_card_info fsi2_hdmi_info = {
> >   	.card		= "FSI2B-HDMI",
> >   	.codec		= "sh-mobile-hdmi",
> >   	.platform	= "sh_fsi2",
> > +	.daifmt		= SND_SOC_DAIFMT_CBM_CFM,   <=
> >   	.cpu_dai = {
> > 		.name	= "fsib-dai",
> > -		.fmt	= SND_SOC_DAIFMT_CBS_CFS,
> >   	},
> 
> Right now the CPU is configured as master, with your proposed change it 
> would be configured as slave. These flags are always from the CODEC's 
> perspective.

I see, your patch was correct for CPU = Master


--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Simon Horman Jan. 30, 2015, 1:25 a.m. UTC | #5
On Tue, Jan 27, 2015 at 11:52:47PM +0000, Kuninori Morimoto wrote:
> 
> Hi Lars
> 
> > > I guess if you want to use common .daifmt, it should be same as "codec" side.
> > > (cpu side "S" means, codec / daifmt side "M")
> > > So, this mean above should be
> > >
> > > @@ -1040,9 +1040,9 @@ static struct asoc_simple_card_info fsi2_hdmi_info = {
> > >   	.card		= "FSI2B-HDMI",
> > >   	.codec		= "sh-mobile-hdmi",
> > >   	.platform	= "sh_fsi2",
> > > +	.daifmt		= SND_SOC_DAIFMT_CBM_CFM,   <=
> > >   	.cpu_dai = {
> > > 		.name	= "fsib-dai",
> > > -		.fmt	= SND_SOC_DAIFMT_CBS_CFS,
> > >   	},
> > 
> > Right now the CPU is configured as master, with your proposed change it 
> > would be configured as slave. These flags are always from the CODEC's 
> > perspective.
> 
> I see, your patch was correct for CPU = Master

Morimoto-san, could you clarify if you would like me to pick up
this patch or not? (I am a bit confused.)
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c
index 6d949f1..75de26c 100644
--- a/arch/arm/mach-shmobile/board-armadillo800eva.c
+++ b/arch/arm/mach-shmobile/board-armadillo800eva.c
@@ -1040,9 +1040,9 @@  static struct asoc_simple_card_info fsi2_hdmi_info = {
 	.card		= "FSI2B-HDMI",
 	.codec		= "sh-mobile-hdmi",
 	.platform	= "sh_fsi2",
+	.daifmt		= SND_SOC_DAIFMT_CBS_CFS,
 	.cpu_dai = {
 		.name	= "fsib-dai",
-		.fmt	= SND_SOC_DAIFMT_CBS_CFS,
 	},
 	.codec_dai = {
 		.name = "sh_mobile_hdmi-hifi",