Re: [PATCH v6 2/6] ASoC: sgtl5000: Improve VAG power and mute control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 2019-07-19 12:05, Oleksandr Suvorov wrote:
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

Cc: stable@xxxxxxxxxxxxxxx
Fixes: 9b34e6cc3bc2 ("ASoC: Add Freescale SGTL5000 codec support")
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@xxxxxxxxxxx>
Reviewed-by: Marcel Ziswiler <marcel.ziswiler@xxxxxxxxxxx>
Reviewed-by: Fabio Estevam <festevam@xxxxxxxxx>

---

Changes in v6:
- Code optimization

You went crazy with that description (u16 mute_mask[]) :)

Reviewed-by: Cezary Rojewski <cezary.rojewski@xxxxxxxxx>
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux