Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1230215 > unrolled thread

Re: [linux-sunxi] [PATCH 0/2] ASoC: Add support for the Allwinner A10 codec

Started byPriit Laes <plaes@plaes.org>
First post2015-09-22 15:40 +0200
Last post2015-09-30 19:40 +0200
Articles 5 — 5 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [linux-sunxi] [PATCH 0/2] ASoC: Add support for the Allwinner  A10 codec Priit Laes <plaes@plaes.org> - 2015-09-22 15:40 +0200
    Re: [linux-sunxi] [PATCH 0/2] ASoC: Add support for the Allwinner  A10 codec Maxime Ripard <maxime.ripard@free-electrons.com> - 2015-09-28 09:50 +0200
      Re: [linux-sunxi] [PATCH 0/2] ASoC: Add support for the Allwinner A10 codec Chen-Yu Tsai <wens@csie.org> - 2015-09-29 10:40 +0200
      Re: [linux-sunxi] [PATCH 0/2] ASoC: Add support for the Allwinner A10  codec Hans de Goede <hdegoede@redhat.com> - 2015-09-29 23:20 +0200
        Re: [linux-sunxi] [PATCH 0/2] ASoC: Add support for the Allwinner  A10 codec Mark Brown <broonie@kernel.org> - 2015-09-30 19:40 +0200

#1230215 — Re: [linux-sunxi] [PATCH 0/2] ASoC: Add support for the Allwinner A10 codec

FromPriit Laes <plaes@plaes.org>
Date2015-09-22 15:40 +0200
SubjectRe: [linux-sunxi] [PATCH 0/2] ASoC: Add support for the Allwinner A10 codec
Message-ID<qbvXB-6LG-49@gated-at.bofh.it>
On Sat, 2015-09-12 at 15:26 +0200, Maxime Ripard wrote:
> Hi everyone,
> 
> This patch set adds the support for what Allwinner calls the codec on
> their SoCs.
> 
> This codec is actually a combination of a codec and DAI, tied
> together
> in a single memory-mapped IP. It is completely standalone, and
> outputs
> directly the analog signal.
> 
> While it supports both playback and capture, the capture is not
> implemented in this patch, and will be posted eventually as a
> separate
> one.
> 
> This set, in order to be functional, has a dependency on the audio
> clocks patch set posted separately. However, it doesn't needs this to
> compile properly, so I guess it can be merged without really caring
> for the merging status of the clock patches.

It works on Gemei G9 tablet which has also extra chip that
automatically switches output over from internal speakers to headphones
when connector is inserted.

Now I noticed some weird things:

When I have all the switches as ON in alsamixer, and I start disabling
them, I get following weird results.

Left Mixer Left - LML
Right Mixer Left - LMR
Right Mixer Right - RMR

Very faint output:
LML - ON
RML - Mute
RMR - ON

Output works fully:
LML - Mute
RML - Mute
RMR - Mute

When I Mute Pre-Amplifier and fiddle any of LML, RML or RMR, the output
stays mute even after setting Pre-Amplifier Mute back on:

1. All switches on
2. Mute pre-amplifier
3. Mute RMR
4. Pre-Amilifier Mute Off
.. Music stays off
5. Toggle Pre-Amplifier twice - output turns on


And also following in dmesg:
sun4i-codec 1c22c00.codec: Codec <-> 1c22c00.codec mapping ok
sun4i-codec 1c22c00.codec: ASoC: no sink widget found for Headphone Jack
sun4i-codec 1c22c00.codec: ASoC: Failed to add route HP Left -> direct -> Headphone Jack
sun4i-codec 1c22c00.codec: ASoC: no sink widget found for Headphone Jack
sun4i-codec 1c22c00.codec: ASoC: Failed to add route HP Right -> direct -> Headphone Jack


With following patch to DTS:

+&codec {
+       routing = "Headphone Jack", "HP Left",
+                         "Headphone Jack", "HP Right";
+       status = "okay";
+};

> 
> Let me know what you think,
> Maxime
> 
> Emilio López (1):
>   ASoC: sunxi: add support for the on-chip codec on early Allwinner
> SoCs
> 
> Maxime Ripard (1):
>   Documentation: bindings: Add the Allwinner A10 codec bindings
> 
>  .../devicetree/bindings/sound/sun4i-codec.txt      |  33 +
>  sound/soc/Kconfig                                  |   1 +
>  sound/soc/Makefile                                 |   1 +
>  sound/soc/sunxi/Kconfig                            |  11 +
>  sound/soc/sunxi/Makefile                           |   2 +
>  sound/soc/sunxi/sun4i-codec.c                      | 720
> +++++++++++++++++++++
>  6 files changed, 767 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/sound/sun4i-
> codec.txt
>  create mode 100644 sound/soc/sunxi/Kconfig
>  create mode 100644 sound/soc/sunxi/Makefile
>  create mode 100644 sound/soc/sunxi/sun4i-codec.c
> 
> -- 
> 2.5.1
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1233921

FromMaxime Ripard <maxime.ripard@free-electrons.com>
Date2015-09-28 09:50 +0200
Message-ID<qdBma-7It-11@gated-at.bofh.it>
In reply to#1230215

[Multipart message — attachments visible in raw view] — view raw

Hi Priit,

On Tue, Sep 22, 2015 at 04:26:57PM +0300, Priit Laes wrote:
> On Sat, 2015-09-12 at 15:26 +0200, Maxime Ripard wrote:
> > Hi everyone,
> > 
> > This patch set adds the support for what Allwinner calls the codec on
> > their SoCs.
> > 
> > This codec is actually a combination of a codec and DAI, tied
> > together
> > in a single memory-mapped IP. It is completely standalone, and
> > outputs
> > directly the analog signal.
> > 
> > While it supports both playback and capture, the capture is not
> > implemented in this patch, and will be posted eventually as a
> > separate
> > one.
> > 
> > This set, in order to be functional, has a dependency on the audio
> > clocks patch set posted separately. However, it doesn't needs this to
> > compile properly, so I guess it can be merged without really caring
> > for the merging status of the clock patches.
> 
> It works on Gemei G9 tablet which has also extra chip that
> automatically switches output over from internal speakers to headphones
> when connector is inserted.
> 
> Now I noticed some weird things:
> 
> When I have all the switches as ON in alsamixer, and I start disabling
> them, I get following weird results.
> 
> Left Mixer Left - LML
> Right Mixer Left - LMR
> Right Mixer Right - RMR
> 
> Very faint output:
> LML - ON
> RML - Mute
> RMR - ON
> 
> Output works fully:
> LML - Mute
> RML - Mute
> RMR - Mute
> 
> When I Mute Pre-Amplifier and fiddle any of LML, RML or RMR, the output
> stays mute even after setting Pre-Amplifier Mute back on:
> 
> 1. All switches on
> 2. Mute pre-amplifier
> 3. Mute RMR
> 4. Pre-Amilifier Mute Off
> .. Music stays off
> 5. Toggle Pre-Amplifier twice - output turns on

Unfortunately, I don't have access to that SoC or that setup.

Do you have another A10 board with a simpler audio setup, like a
cubieboard?

> And also following in dmesg:
> sun4i-codec 1c22c00.codec: Codec <-> 1c22c00.codec mapping ok
> sun4i-codec 1c22c00.codec: ASoC: no sink widget found for Headphone Jack
> sun4i-codec 1c22c00.codec: ASoC: Failed to add route HP Left -> direct -> Headphone Jack
> sun4i-codec 1c22c00.codec: ASoC: no sink widget found for Headphone Jack
> sun4i-codec 1c22c00.codec: ASoC: Failed to add route HP Right -> direct -> Headphone Jack

That one is weird, I'll look into this.

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

[toc] | [prev] | [next] | [standalone]


#1234828 — Re: [linux-sunxi] [PATCH 0/2] ASoC: Add support for the Allwinner A10 codec

FromChen-Yu Tsai <wens@csie.org>
Date2015-09-29 10:40 +0200
SubjectRe: [linux-sunxi] [PATCH 0/2] ASoC: Add support for the Allwinner A10 codec
Message-ID<qdYC6-1c8-25@gated-at.bofh.it>
In reply to#1233921
On Mon, Sep 28, 2015 at 3:42 PM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> Hi Priit,
>
> On Tue, Sep 22, 2015 at 04:26:57PM +0300, Priit Laes wrote:
>> On Sat, 2015-09-12 at 15:26 +0200, Maxime Ripard wrote:
>> > Hi everyone,
>> >
>> > This patch set adds the support for what Allwinner calls the codec on
>> > their SoCs.
>> >
>> > This codec is actually a combination of a codec and DAI, tied
>> > together
>> > in a single memory-mapped IP. It is completely standalone, and
>> > outputs
>> > directly the analog signal.
>> >
>> > While it supports both playback and capture, the capture is not
>> > implemented in this patch, and will be posted eventually as a
>> > separate
>> > one.
>> >
>> > This set, in order to be functional, has a dependency on the audio
>> > clocks patch set posted separately. However, it doesn't needs this to
>> > compile properly, so I guess it can be merged without really caring
>> > for the merging status of the clock patches.
>>
>> It works on Gemei G9 tablet which has also extra chip that
>> automatically switches output over from internal speakers to headphones
>> when connector is inserted.
>>
>> Now I noticed some weird things:
>>
>> When I have all the switches as ON in alsamixer, and I start disabling
>> them, I get following weird results.
>>
>> Left Mixer Left - LML
>> Right Mixer Left - LMR
>> Right Mixer Right - RMR
>>
>> Very faint output:
>> LML - ON
>> RML - Mute
>> RMR - ON
>>
>> Output works fully:
>> LML - Mute
>> RML - Mute
>> RMR - Mute
>>
>> When I Mute Pre-Amplifier and fiddle any of LML, RML or RMR, the output
>> stays mute even after setting Pre-Amplifier Mute back on:
>>
>> 1. All switches on
>> 2. Mute pre-amplifier
>> 3. Mute RMR
>> 4. Pre-Amilifier Mute Off
>> .. Music stays off
>> 5. Toggle Pre-Amplifier twice - output turns on
>
> Unfortunately, I don't have access to that SoC or that setup.
>
> Do you have another A10 board with a simpler audio setup, like a
> cubieboard?
>
>> And also following in dmesg:
>> sun4i-codec 1c22c00.codec: Codec <-> 1c22c00.codec mapping ok
>> sun4i-codec 1c22c00.codec: ASoC: no sink widget found for Headphone Jack
>> sun4i-codec 1c22c00.codec: ASoC: Failed to add route HP Left -> direct -> Headphone Jack
>> sun4i-codec 1c22c00.codec: ASoC: no sink widget found for Headphone Jack
>> sun4i-codec 1c22c00.codec: ASoC: Failed to add route HP Right -> direct -> Headphone Jack
>
> That one is weird, I'll look into this.

This also appears on my Cubietruck, when using the dts patch from
Hans' sunxi-wip
branch, which is the same patch, albeit for a different dts file, as Priit.

The immediate culprit seems to be the routing property, though I'm not sure what
it should be set to, or what extra drivers might be needed.


Regards
ChenYu
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1235557 — Re: [linux-sunxi] [PATCH 0/2] ASoC: Add support for the Allwinner A10 codec

FromHans de Goede <hdegoede@redhat.com>
Date2015-09-29 23:20 +0200
SubjectRe: [linux-sunxi] [PATCH 0/2] ASoC: Add support for the Allwinner A10 codec
Message-ID<qeatA-1nm-11@gated-at.bofh.it>
In reply to#1233921
Hi,

On 09/28/2015 09:42 AM, Maxime Ripard wrote:
> Hi Priit,
>
> On Tue, Sep 22, 2015 at 04:26:57PM +0300, Priit Laes wrote:
>> On Sat, 2015-09-12 at 15:26 +0200, Maxime Ripard wrote:
>>> Hi everyone,
>>>
>>> This patch set adds the support for what Allwinner calls the codec on
>>> their SoCs.
>>>
>>> This codec is actually a combination of a codec and DAI, tied
>>> together
>>> in a single memory-mapped IP. It is completely standalone, and
>>> outputs
>>> directly the analog signal.
>>>
>>> While it supports both playback and capture, the capture is not
>>> implemented in this patch, and will be posted eventually as a
>>> separate
>>> one.
>>>
>>> This set, in order to be functional, has a dependency on the audio
>>> clocks patch set posted separately. However, it doesn't needs this to
>>> compile properly, so I guess it can be merged without really caring
>>> for the merging status of the clock patches.
>>
>> It works on Gemei G9 tablet which has also extra chip that
>> automatically switches output over from internal speakers to headphones
>> when connector is inserted.
>>
>> Now I noticed some weird things:
>>
>> When I have all the switches as ON in alsamixer, and I start disabling
>> them, I get following weird results.
>>
>> Left Mixer Left - LML
>> Right Mixer Left - LMR
>> Right Mixer Right - RMR
>>
>> Very faint output:
>> LML - ON
>> RML - Mute
>> RMR - ON
>>
>> Output works fully:
>> LML - Mute
>> RML - Mute
>> RMR - Mute
>>
>> When I Mute Pre-Amplifier and fiddle any of LML, RML or RMR, the output
>> stays mute even after setting Pre-Amplifier Mute back on:
>>
>> 1. All switches on
>> 2. Mute pre-amplifier
>> 3. Mute RMR
>> 4. Pre-Amilifier Mute Off
>> .. Music stays off
>> 5. Toggle Pre-Amplifier twice - output turns on
>
> Unfortunately, I don't have access to that SoC or that setup.

I'm seeing similar stuff on a cubieboard, both A10 and A20
based cubieboards, I have to fiddle a bit with the switches
to get things to work. At boot all switches are disabled.

On both A10 and A20 I need to enable to following for things to work:

unmute Pre-Amplifier DAC
unmute Pre-Amplifier Mute

I guess this is just a question if adding some mixer defaults to
the alsa userspace somewhere ?

Regards,

Hans
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1236583

FromMark Brown <broonie@kernel.org>
Date2015-09-30 19:40 +0200
Message-ID<qetwe-3ox-37@gated-at.bofh.it>
In reply to#1235557

[Multipart message — attachments visible in raw view] — view raw

On Tue, Sep 29, 2015 at 11:13:56PM +0200, Hans de Goede wrote:

> On both A10 and A20 I need to enable to following for things to work:

> unmute Pre-Amplifier DAC
> unmute Pre-Amplifier Mute

> I guess this is just a question if adding some mixer defaults to
> the alsa userspace somewhere ?

Yes, you're looking for something in /usr/share/alsa/cards here (shipped
in alsa-lib).

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web