2015-07-02 11:58:45

by Peter Ujfalusi

[permalink] [raw]
Subject: [PATCH 0/2] ARM: DTS: am437x-sk-evm: Use simple-card for audio support

Hi,

There is no reason to use the davinci-evm machine driver's compatible for audio
support since the setup is simple and the common simple-audio-card can handle it
just fine.
Also add McASP1 sleep pin configuration.

Regards,
Peter
---
Peter Ujfalusi (2):
ARM: DTS: am437x-sk-evm: Add sleep pin settings for mcasp1
ARM: DTS: am437x-sk-evm: Switch using simple-audio-card for audio
support

arch/arm/boot/dts/am437x-sk-evm.dts | 42 +++++++++++++++++++++++++++++--------
1 file changed, 33 insertions(+), 9 deletions(-)

--
2.4.5


2015-07-02 11:59:04

by Peter Ujfalusi

[permalink] [raw]
Subject: [PATCH 1/2] ARM: DTS: am437x-sk-evm: Add sleep pin settings for mcasp1

When McASP is not in use the pins can be put to sleep mode to conserve
power.

Signed-off-by: Peter Ujfalusi <[email protected]>
---
arch/arm/boot/dts/am437x-sk-evm.dts | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/am437x-sk-evm.dts b/arch/arm/boot/dts/am437x-sk-evm.dts
index c17097d2c167..b5de6b0d622c 100644
--- a/arch/arm/boot/dts/am437x-sk-evm.dts
+++ b/arch/arm/boot/dts/am437x-sk-evm.dts
@@ -364,6 +364,15 @@
>;
};

+ mcasp1_pins_sleep: mcasp1_pins_sleep {
+ pinctrl-single,pins = <
+ 0x10c (PIN_INPUT_PULLDOWN | MUX_MODE7)
+ 0x110 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+ 0x108 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+ 0x144 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+ >;
+ };
+
lcd_pins: lcd_pins {
pinctrl-single,pins = <
0x1c (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpcm_ad7.gpio1_7 */
@@ -640,8 +649,9 @@
};

&mcasp1 {
- pinctrl-names = "default";
+ pinctrl-names = "default", "sleep";
pinctrl-0 = <&mcasp1_pins>;
+ pinctrl-1 = <&mcasp1_pins_sleep>;

status = "okay";

--
2.4.5

2015-07-02 11:59:13

by Peter Ujfalusi

[permalink] [raw]
Subject: [PATCH 2/2] ARM: DTS: am437x-sk-evm: Switch using simple-audio-card for audio support

The sound support consist only Headset output on the board and can be
handled by "simple-audio-card"

Signed-off-by: Peter Ujfalusi <[email protected]>
---
arch/arm/boot/dts/am437x-sk-evm.dts | 30 ++++++++++++++++++++++--------
1 file changed, 22 insertions(+), 8 deletions(-)

diff --git a/arch/arm/boot/dts/am437x-sk-evm.dts b/arch/arm/boot/dts/am437x-sk-evm.dts
index b5de6b0d622c..e09216cb14df 100644
--- a/arch/arm/boot/dts/am437x-sk-evm.dts
+++ b/arch/arm/boot/dts/am437x-sk-evm.dts
@@ -32,14 +32,26 @@
};

sound {
- compatible = "ti,da830-evm-audio";
- ti,model = "AM437x-SK-EVM";
- ti,audio-codec = <&tlv320aic3106>;
- ti,mcasp-controller = <&mcasp1>;
- ti,codec-clock-rate = <24000000>;
- ti,audio-routing =
- "Headphone Jack", "HPLOUT",
- "Headphone Jack", "HPROUT";
+ compatible = "simple-audio-card";
+ simple-audio-card,name = "AM437x-SK-EVM";
+ simple-audio-card,widgets =
+ "Headphone", "Headphone Jack";
+ simple-audio-card,routing =
+ "Headphone Jack", "HPLOUT",
+ "Headphone Jack", "HPROUT";
+ simple-audio-card,format = "dsp_b";
+ simple-audio-card,bitclock-master = <&sound_master>;
+ simple-audio-card,frame-master = <&sound_master>;
+ simple-audio-card,bitclock-inversion;
+
+ simple-audio-card,cpu {
+ sound-dai = <&mcasp1>;
+ };
+
+ sound_master: simple-audio-card,codec {
+ sound-dai = <&tlv320aic3106>;
+ system-clock-frequency = <24000000>;
+ };
};

matrix_keypad: matrix_keypad@0 {
@@ -489,6 +501,7 @@
};

tlv320aic3106: tlv320aic3106@1b {
+ #sound-dai-cells = <0>;
compatible = "ti,tlv320aic3106";
reg = <0x1b>;
status = "okay";
@@ -649,6 +662,7 @@
};

&mcasp1 {
+ #sound-dai-cells = <0>;
pinctrl-names = "default", "sleep";
pinctrl-0 = <&mcasp1_pins>;
pinctrl-1 = <&mcasp1_pins_sleep>;
--
2.4.5

2015-07-02 12:11:22

by Felipe Balbi

[permalink] [raw]
Subject: Re: [PATCH 0/2] ARM: DTS: am437x-sk-evm: Use simple-card for audio support

Hi,

On Thu, Jul 02, 2015 at 02:58:04PM +0300, Peter Ujfalusi wrote:
> Hi,
>
> There is no reason to use the davinci-evm machine driver's compatible for audio
> support since the setup is simple and the common simple-audio-card can handle it
> just fine.
> Also add McASP1 sleep pin configuration.
>
> Regards,
> Peter
> ---
> Peter Ujfalusi (2):
> ARM: DTS: am437x-sk-evm: Add sleep pin settings for mcasp1
> ARM: DTS: am437x-sk-evm: Switch using simple-audio-card for audio
> support

you should add a patch enabling CONFIG_SND_SIMPLE_CARD=m in
omap2plus_defconfig

--
balbi


Attachments:
(No filename) (588.00 B)
signature.asc (819.00 B)
Digital signature
Download all attachments

2015-07-02 12:17:23

by Felipe Balbi

[permalink] [raw]
Subject: Re: [PATCH 1/2] ARM: DTS: am437x-sk-evm: Add sleep pin settings for mcasp1

On Thu, Jul 02, 2015 at 02:58:05PM +0300, Peter Ujfalusi wrote:
> When McASP is not in use the pins can be put to sleep mode to conserve
> power.
>
> Signed-off-by: Peter Ujfalusi <[email protected]>

Tested-by: Felipe Balbi <[email protected]>

--
balbi


Attachments:
(No filename) (256.00 B)
signature.asc (819.00 B)
Digital signature
Download all attachments

2015-07-02 12:24:09

by Felipe Balbi

[permalink] [raw]
Subject: Re: [PATCH 2/2] ARM: DTS: am437x-sk-evm: Switch using simple-audio-card for audio support

On Thu, Jul 02, 2015 at 02:58:06PM +0300, Peter Ujfalusi wrote:
> The sound support consist only Headset output on the board and can be
> handled by "simple-audio-card"
>
> Signed-off-by: Peter Ujfalusi <[email protected]>

Still works fine:

Tested-by: Felipe Balbi <[email protected]>

one question though, should Line In be listed below ? Also, unrelated to
$subject, but if I wait for a few seconds between runs of speaker-test
(iow, if I allow mcasp to idle) then I hear a slight chopping sound when
starting, perhaps we're unmuting too early ?

> ---
> arch/arm/boot/dts/am437x-sk-evm.dts | 30 ++++++++++++++++++++++--------
> 1 file changed, 22 insertions(+), 8 deletions(-)
>
> diff --git a/arch/arm/boot/dts/am437x-sk-evm.dts b/arch/arm/boot/dts/am437x-sk-evm.dts
> index b5de6b0d622c..e09216cb14df 100644
> --- a/arch/arm/boot/dts/am437x-sk-evm.dts
> +++ b/arch/arm/boot/dts/am437x-sk-evm.dts
> @@ -32,14 +32,26 @@
> };
>
> sound {
> - compatible = "ti,da830-evm-audio";
> - ti,model = "AM437x-SK-EVM";
> - ti,audio-codec = <&tlv320aic3106>;
> - ti,mcasp-controller = <&mcasp1>;
> - ti,codec-clock-rate = <24000000>;
> - ti,audio-routing =
> - "Headphone Jack", "HPLOUT",
> - "Headphone Jack", "HPROUT";
> + compatible = "simple-audio-card";
> + simple-audio-card,name = "AM437x-SK-EVM";
> + simple-audio-card,widgets =
> + "Headphone", "Headphone Jack";
> + simple-audio-card,routing =
> + "Headphone Jack", "HPLOUT",
> + "Headphone Jack", "HPROUT";
> + simple-audio-card,format = "dsp_b";
> + simple-audio-card,bitclock-master = <&sound_master>;
> + simple-audio-card,frame-master = <&sound_master>;
> + simple-audio-card,bitclock-inversion;
> +
> + simple-audio-card,cpu {
> + sound-dai = <&mcasp1>;
> + };
> +
> + sound_master: simple-audio-card,codec {
> + sound-dai = <&tlv320aic3106>;
> + system-clock-frequency = <24000000>;
> + };
> };
>
> matrix_keypad: matrix_keypad@0 {
> @@ -489,6 +501,7 @@
> };
>
> tlv320aic3106: tlv320aic3106@1b {
> + #sound-dai-cells = <0>;
> compatible = "ti,tlv320aic3106";
> reg = <0x1b>;
> status = "okay";
> @@ -649,6 +662,7 @@
> };
>
> &mcasp1 {
> + #sound-dai-cells = <0>;
> pinctrl-names = "default", "sleep";
> pinctrl-0 = <&mcasp1_pins>;
> pinctrl-1 = <&mcasp1_pins_sleep>;
> --
> 2.4.5
>

--
balbi


Attachments:
(No filename) (2.29 kB)
signature.asc (819.00 B)
Digital signature
Download all attachments

2015-07-02 12:53:28

by Peter Ujfalusi

[permalink] [raw]
Subject: Re: [PATCH 2/2] ARM: DTS: am437x-sk-evm: Switch using simple-audio-card for audio support

On 07/02/2015 03:23 PM, Felipe Balbi wrote:
> On Thu, Jul 02, 2015 at 02:58:06PM +0300, Peter Ujfalusi wrote:
>> The sound support consist only Headset output on the board and can be
>> handled by "simple-audio-card"
>>
>> Signed-off-by: Peter Ujfalusi <[email protected]>
>
> Still works fine:
>
> Tested-by: Felipe Balbi <[email protected]>
>
> one question though, should Line In be listed below ?

Does the board have Line-in? I don't have the board, but I know this patch
works on it ;)
We only had playback path before also.

> Also, unrelated to
> $subject, but if I wait for a few seconds between runs of speaker-test
> (iow, if I allow mcasp to idle) then I hear a slight chopping sound when
> starting, perhaps we're unmuting too early ?

Is it only with this patch (via simple-card) or was it the same via the
davinci-evm (ti,da830-evm-audio)?

--
P?ter

>
>> ---
>> arch/arm/boot/dts/am437x-sk-evm.dts | 30 ++++++++++++++++++++++--------
>> 1 file changed, 22 insertions(+), 8 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/am437x-sk-evm.dts b/arch/arm/boot/dts/am437x-sk-evm.dts
>> index b5de6b0d622c..e09216cb14df 100644
>> --- a/arch/arm/boot/dts/am437x-sk-evm.dts
>> +++ b/arch/arm/boot/dts/am437x-sk-evm.dts
>> @@ -32,14 +32,26 @@
>> };
>>
>> sound {
>> - compatible = "ti,da830-evm-audio";
>> - ti,model = "AM437x-SK-EVM";
>> - ti,audio-codec = <&tlv320aic3106>;
>> - ti,mcasp-controller = <&mcasp1>;
>> - ti,codec-clock-rate = <24000000>;
>> - ti,audio-routing =
>> - "Headphone Jack", "HPLOUT",
>> - "Headphone Jack", "HPROUT";
>> + compatible = "simple-audio-card";
>> + simple-audio-card,name = "AM437x-SK-EVM";
>> + simple-audio-card,widgets =
>> + "Headphone", "Headphone Jack";
>> + simple-audio-card,routing =
>> + "Headphone Jack", "HPLOUT",
>> + "Headphone Jack", "HPROUT";
>> + simple-audio-card,format = "dsp_b";
>> + simple-audio-card,bitclock-master = <&sound_master>;
>> + simple-audio-card,frame-master = <&sound_master>;
>> + simple-audio-card,bitclock-inversion;
>> +
>> + simple-audio-card,cpu {
>> + sound-dai = <&mcasp1>;
>> + };
>> +
>> + sound_master: simple-audio-card,codec {
>> + sound-dai = <&tlv320aic3106>;
>> + system-clock-frequency = <24000000>;
>> + };
>> };
>>
>> matrix_keypad: matrix_keypad@0 {
>> @@ -489,6 +501,7 @@
>> };
>>
>> tlv320aic3106: tlv320aic3106@1b {
>> + #sound-dai-cells = <0>;
>> compatible = "ti,tlv320aic3106";
>> reg = <0x1b>;
>> status = "okay";
>> @@ -649,6 +662,7 @@
>> };
>>
>> &mcasp1 {
>> + #sound-dai-cells = <0>;
>> pinctrl-names = "default", "sleep";
>> pinctrl-0 = <&mcasp1_pins>;
>> pinctrl-1 = <&mcasp1_pins_sleep>;
>> --
>> 2.4.5
>>
>

2015-07-02 12:55:47

by Peter Ujfalusi

[permalink] [raw]
Subject: Re: [PATCH 0/2] ARM: DTS: am437x-sk-evm: Use simple-card for audio support

On 07/02/2015 03:10 PM, Felipe Balbi wrote:
> Hi,
>
> On Thu, Jul 02, 2015 at 02:58:04PM +0300, Peter Ujfalusi wrote:
>> Hi,
>>
>> There is no reason to use the davinci-evm machine driver's compatible for audio
>> support since the setup is simple and the common simple-audio-card can handle it
>> just fine.
>> Also add McASP1 sleep pin configuration.
>>
>> Regards,
>> Peter
>> ---
>> Peter Ujfalusi (2):
>> ARM: DTS: am437x-sk-evm: Add sleep pin settings for mcasp1
>> ARM: DTS: am437x-sk-evm: Switch using simple-audio-card for audio
>> support
>
> you should add a patch enabling CONFIG_SND_SIMPLE_CARD=m in
> omap2plus_defconfig

Oh, true.
I'll then resend this as part of a bigger series (am335x-evmsk/evm,
am437x-gp/epos/sk).
I planned to send them as separate, but you are right, simple card need to be
enabled first.

--
P?ter

2015-07-02 13:20:24

by Felipe Balbi

[permalink] [raw]
Subject: Re: [PATCH 2/2] ARM: DTS: am437x-sk-evm: Switch using simple-audio-card for audio support

On Thu, Jul 02, 2015 at 03:52:49PM +0300, Peter Ujfalusi wrote:
> On 07/02/2015 03:23 PM, Felipe Balbi wrote:
> > On Thu, Jul 02, 2015 at 02:58:06PM +0300, Peter Ujfalusi wrote:
> >> The sound support consist only Headset output on the board and can be
> >> handled by "simple-audio-card"
> >>
> >> Signed-off-by: Peter Ujfalusi <[email protected]>
> >
> > Still works fine:
> >
> > Tested-by: Felipe Balbi <[email protected]>
> >
> > one question though, should Line In be listed below ?
>
> Does the board have Line-in? I don't have the board, but I know this patch

yeah, it does :-)

> works on it ;)
> We only had playback path before also.

indeed, should go for -next only :-s

> > Also, unrelated to
> > $subject, but if I wait for a few seconds between runs of speaker-test
> > (iow, if I allow mcasp to idle) then I hear a slight chopping sound when
> > starting, perhaps we're unmuting too early ?
>
> Is it only with this patch (via simple-card) or was it the same via the
> davinci-evm (ti,da830-evm-audio)?

/me goes test again

also without this patch :-)

--
balbi


Attachments:
(No filename) (1.06 kB)
signature.asc (819.00 B)
Digital signature
Download all attachments