diff options
author | Oleksandr Suvorov <oleksandr.suvorov@toradex.com> | 2019-05-20 10:42:32 +0300 |
---|---|---|
committer | Oleksandr Suvorov <oleksandr.suvorov@toradex.com> | 2019-09-09 14:01:29 +0300 |
commit | f474033a6822c0a4387a351834b7c421faf56acc (patch) | |
tree | 9c9c3da44ddf992ac4569f4e2a401dffd3bb1dc8 /lib/decompress_unlzma.c | |
parent | c299ce7d7cb3859ffab664eee4107f749df1a5ba (diff) |
ASoC: sgtl5000: Improve VAG power and mute control
Backported from commit e6e98e2e05baa3862ac7d1d2334f88ec927c8f66.
VAG power control is improved to fit the manual [1]. This patch fixes as
minimum one bug: if customer muxes Headphone to Line-In right after boot,
the VAG power remains off that leads to poor sound quality from line-in.
I.e. after boot:
- Connect sound source to Line-In jack;
- Connect headphone to HP jack;
- Run following commands:
$ amixer set 'Headphone' 80%
$ amixer set 'Headphone Mux' LINE_IN
Change VAG power on/off control according to the following algorithm:
- turn VAG power ON on the 1st incoming event.
- keep it ON if there is any active VAG consumer (ADC/DAC/HP/Line-In).
- turn VAG power OFF when there is the latest consumer's pre-down event
come.
- always delay after VAG power OFF to avoid pop.
- delay after VAG power ON if the initiative consumer is Line-In, this
prevents pop during line-in muxing.
According to the data sheet [1], to avoid any pops/clicks,
the outputs should be muted during input/output
routing changes.
[1] https://www.nxp.com/docs/en/data-sheet/SGTL5000.pdf
Fixes: 9b34e6cc3bc2 ("ASoC: Add Freescale SGTL5000 codec support")
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
Reviewed-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Diffstat (limited to 'lib/decompress_unlzma.c')
0 files changed, 0 insertions, 0 deletions