Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix reduced volume issue for users of PCM5122 DAC #889

Merged
merged 2 commits into from
Mar 23, 2015

Conversation

hmbedded
Copy link
Contributor

Since the recent upgrade to the 3.18 kernel users of the PCM5122 DAC have found that there output volume has been significantly reduced. The issue is related to commit id 5be2fc2 which added support for a couple of analogue gain selections. One of these (Playback Volume) sets a gain of either 0db or -6dB and is intended to set the full scale output at 2Vrms or 1Vrms respectively. The reset state is 0db (so 2Vrms) but unfortunately "alsactl restore" applies a default of -20dB to a control named "Playback Volume" if '/var/lib/alsa/asound.state' doesn't exist or there is no saved state for a particular control. So the control ends up at -6dB and the volume is halved. I have reported this issue upstream here: http://thread.gmane.org/gmane.linux.alsa.devel/135504 but in the meantime I think the best course of action is to revert to the 3.12 situation and simply remove these controls. Therefore this pull request simply reverts commit 5be2fc2.

@popcornmix
Copy link
Collaborator

This is an upstream commit you are reverting. I'm not keen on doing that without confirmation it is correct.
We'll see what the view is from the upstream mailing list discussion. Let me know if a consensus is reached.

@hmbedded
Copy link
Contributor Author

A consensus has been reached and as a result I submitted a couple of patches upstream: http://thread.gmane.org/gmane.linux.alsa.devel/135729. These have been accepted and have now made it to the linux-next tree. I'll update this PR with these patches shortly.

Currently 'Playback Volume' is the correct way to express an analogue
volume control. However, this control name has initialisation defaults
applied when using 'alsactl restore' and in some cases this is not
appropriate. An example would be a control that has a selection of
0db and -6dB of gain that is intended to set the fullscale ouput
voltage of a DAC. The TI pcm512x family of DAcs have such a control.
In this case the device/driver reset defaults are preferred.

Signed-off-by: Howard Mitchell <hm@hmbedded.co.uk>
Acked-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
This is to ensure that 'alsactl restore' does not apply default
initialisation as the chip reset defaults are preferred.

Signed-off-by: Howard Mitchell <hm@hmbedded.co.uk>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
@hmbedded hmbedded force-pushed the rpi-3.18.y-iqaudio branch from d04e42b to 24dd643 Compare March 23, 2015 11:28
popcornmix added a commit that referenced this pull request Mar 23, 2015
Fix reduced volume issue for users of PCM5122 DAC
@popcornmix popcornmix merged commit cfe746c into raspberrypi:rpi-3.18.y Mar 23, 2015
@popcornmix
Copy link
Collaborator

Thanks.

popcornmix added a commit to raspberrypi/firmware that referenced this pull request Mar 25, 2015
kernel: Add driver for rpi-proto
See: raspberrypi/linux#908

kernel: Fix reduced volume issue for users of PCM5122 DAC
See: raspberrypi/linux#889

firmware: arm_loader: Refactor freq/freq_min logic and allow h264 freq_min to be increased

firmware: arm_loader: Allow non-turbo voltage to be increased by up to two config steps

firmware: video codec: refactor userdata release mechanics in categoriser

firmware: hvs: experimental: reduce hvs non-panic priority on 2836

firmware: arm_loader: Add force_eeprom_read setting

firmware: bootcode: Add bootcode_delay for an early delay
See: #401

firmware: dispmanx: Fix stereoscopic flags to invert left/right eyes with multichannel
See: http://forum.kodi.tv/showthread.php?tid=211501&pid=1956924#pid1956924

firmware: [deinterlace] Avoid asserts on half rate deinterlace

firmware: [audioplus] Limit samplerate/channels to something we expect to be able to support through hdmi

firmware: [deinterlace] Fall back to fast algorithm in a cleaner way

firmware: MMAL opaque - reduce back below 128 btyes
See: #377 (comment)

firmware: arm_loader: Avoid double-free when disabling HAT overlay, and always relocate overlay phandles

firmware: vc_pool_image: add locking around linked image release
popcornmix added a commit to Hexxeh/rpi-firmware that referenced this pull request Mar 25, 2015
kernel: Add driver for rpi-proto
See: raspberrypi/linux#908

kernel: Fix reduced volume issue for users of PCM5122 DAC
See: raspberrypi/linux#889

firmware: arm_loader: Refactor freq/freq_min logic and allow h264 freq_min to be increased

firmware: arm_loader: Allow non-turbo voltage to be increased by up to two config steps

firmware: video codec: refactor userdata release mechanics in categoriser

firmware: hvs: experimental: reduce hvs non-panic priority on 2836

firmware: arm_loader: Add force_eeprom_read setting

firmware: bootcode: Add bootcode_delay for an early delay
See: raspberrypi/firmware#401

firmware: dispmanx: Fix stereoscopic flags to invert left/right eyes with multichannel
See: http://forum.kodi.tv/showthread.php?tid=211501&pid=1956924#pid1956924

firmware: [deinterlace] Avoid asserts on half rate deinterlace

firmware: [audioplus] Limit samplerate/channels to something we expect to be able to support through hdmi

firmware: [deinterlace] Fall back to fast algorithm in a cleaner way

firmware: MMAL opaque - reduce back below 128 btyes
See: raspberrypi/firmware#377 (comment)

firmware: arm_loader: Avoid double-free when disabling HAT overlay, and always relocate overlay phandles

firmware: vc_pool_image: add locking around linked image release
neuschaefer pushed a commit to neuschaefer/raspi-binary-firmware that referenced this pull request Feb 27, 2017
kernel: Add driver for rpi-proto
See: raspberrypi/linux#908

kernel: Fix reduced volume issue for users of PCM5122 DAC
See: raspberrypi/linux#889

firmware: arm_loader: Refactor freq/freq_min logic and allow h264 freq_min to be increased

firmware: arm_loader: Allow non-turbo voltage to be increased by up to two config steps

firmware: video codec: refactor userdata release mechanics in categoriser

firmware: hvs: experimental: reduce hvs non-panic priority on 2836

firmware: arm_loader: Add force_eeprom_read setting

firmware: bootcode: Add bootcode_delay for an early delay
See: raspberrypi#401

firmware: dispmanx: Fix stereoscopic flags to invert left/right eyes with multichannel
See: http://forum.kodi.tv/showthread.php?tid=211501&pid=1956924#pid1956924

firmware: [deinterlace] Avoid asserts on half rate deinterlace

firmware: [audioplus] Limit samplerate/channels to something we expect to be able to support through hdmi

firmware: [deinterlace] Fall back to fast algorithm in a cleaner way

firmware: MMAL opaque - reduce back below 128 btyes
See: raspberrypi#377 (comment)

firmware: arm_loader: Avoid double-free when disabling HAT overlay, and always relocate overlay phandles

firmware: vc_pool_image: add locking around linked image release
pfpacket pushed a commit to pfpacket/linux-rpi-rust that referenced this pull request Apr 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants