On 05/10/16 16:29, H. Nikolaus Schaller wrote:
Hi Peter,
Am 10.05.2016 um 11:11 schrieb Peter Ujfalusi peter.ujfalusi@ti.com:
Hi,
I only send this to the kernel@pyra-handheld.com for testing. Tero's patch for sure needs to be split up for upstream and needs commit message
As for the rest: I think both the mfd and ASoC patch can go upstream if the tesing goes fine.
Some notes: the MCLK for HPPLL is going to be handled runtime and it is only enabled when it has been requested - during audio playback/capture when no audio is running we switch back to LPPLL. According to the datasheet it provides a bit lower power consumption.
The switch between the LPPLL and HPPLL is not possible during active audio, the mixer change will take efect after audio stop and restart. No change in this.
Tested on top of: next-20160509
I have integrated your patches and they appear to work :)
I can check with "devmem2 0x4AE0CDB4" that it changes the ckobuffer from 0x0 to 0x10000000 and back. So this part works fine :)
Great, thanks! I will prepare the patches for upstream for the twl6040.
On the headset port I get what I regard as "good quality" (audiophiles may disagree...).
Yeah, twl6040 is not that bad in this regards IMHO.
The handsfree speakers have big distortion (scrachy, clipped). It did have this before as well but I have the impression that it even got worse. I remember our first experiments with the Pandaboard where it did work (I have to set it up again for comparisons).
Hrm, but this is unrelated to this series, right? Too high gain for the HF path? I can not test HF on OMAP5, only the line-out and that sounds OK. Since the Line-out is the same audio signal w/o going through the HF drivers it might be a good idea to see if that also have distortion. If not than the path from HF drivers to the speaker is the one which adds the distortion. Most likely.
Sometimes I get a data block of random noise... But that might be DMA/interrupt related buffer-underrun, although I do not see any significant messages. Or sox/play has a bug.
Have been playing 4 channel wav with aplay for about an hour and I have not experienced any noise (via line-out + headset), so not sure what could cause it.
In my experiments, playing music is done by sox/play:
play somefile.mp3 remix 1 1 2 2
Let me try this.
And I have:
root@letux:~# amixer get "Headset Power Mode" Simple mixer control 'Headset Power Mode',0 Capabilities: enum Items: 'Low-Power' 'High-Performance' Item0: 'High-Performance' root@letux:~# amixer get "PLL Selection" Simple mixer control 'PLL Selection',0 Capabilities: enum Items: 'Low-Power' 'High-Performance' Item0: 'High-Performance' root@letux:~#
Is this ok?
Anyways, setting both to low power/performance has no audible effect.
The HPPLL will give more accurate internal clocks so audio will be more precise and the headset High performance mode gives better dynamic range, it might or might not audible, but I believe with the correct material - not mp3 ;) - there is a difference.
BR and thanks, Nikolaus
Regards, Peter
Peter Ujfalusi (3): mfd: twl6040: Handle mclk (for HPPLL) via clock API ASoC: twl6040: Select LPPLL during standby ARM: dts: omap5-board-common: Add phandle for mclk clock for twl6040
Tero Kristo (1): ARM: omap5: add support for fref_xtal_ck
Documentation/devicetree/bindings/mfd/twl6040.txt | 4 ++-- arch/arm/boot/dts/omap5-board-common.dtsi | 4 ++-- arch/arm/boot/dts/omap5.dtsi | 22 ++++++++++++++++++ arch/arm/boot/dts/omap54xx-clocks.dtsi | 10 ++++++++ arch/arm/mach-omap2/control.c | 20 ++++++++++++---- drivers/clk/ti/clk-54xx.c | 1 + drivers/mfd/twl6040.c | 28 ++++++++++++++++++----- include/linux/clk/ti.h | 1 + include/linux/mfd/twl6040.h | 3 ++- sound/soc/codecs/twl6040.c | 12 ++++++---- 10 files changed, 86 insertions(+), 19 deletions(-)
-- 2.8.2