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

From: Priit Laes
Date: Tue Sep 22 2015 - 09:33:36 EST


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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/