All of lore.kernel.org
 help / color / mirror / Atom feed
From: Howard Mitchell <hm@hmbedded.co.uk>
To: alsa-devel@alsa-project.org
Cc: Takashi Iwai <tiwai@suse.de>,
	Gordon Garrity <gordon.garrity@gmail.com>,
	broonie@kernel.org
Subject: pcm512x driver: Mixer control naming issue
Date: Fri, 13 Mar 2015 12:41:05 +0000	[thread overview]
Message-ID: <5502DAE1.30609@hmbedded.co.uk> (raw)
In-Reply-To: <5500DE5B.2020401@hmbedded.co.uk>

Hi,

As you may be aware the Raspbian distribution for the RaspberryPi has 
recently been upgraded to kernel version 3.18. It was previously at 
version 3.12. This has had the unfortunate side effect that users of the 
PCM5122 DAC have found that the output volume has been significantly 
reduced. The issue is related to this commit 
<https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/sound/soc/codecs/pcm512x.c?id=5be2fc20b101b5138c4f54a584dc11790ef16598> 
which adds support for a couple of analogue gain controls. One control 
(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 other 
(Playback Boost Volume) provides a boost of +0.8dB. The hardware reset 
value of both of these gain controls is 0dB, however, in the Raspbian 
distribution 'Playback Volume' is being defaulted to -6dB.

After some investigation I figured out that this was caused by the alsa 
restore mechanism. If '/var/lib/alsa/asound.state' doesn't exist or 
there is no saved state for a particular control then the defaults in 
'/usr/share/alsa/init/default' are used. In this file the default for a 
control named 'Playback Volume' is -20dB which is forcing the control to 
it's minimum value of -6dB. This seems like incorrect behaviour for 
something that is essentially an implementation detail, i.e. a choice 
that should be made by the board designer not the end user. Therefore 
I'd like to see what you think of the following suggestions (which I'd 
be more than happy to implement and submit patches for):

  * Either change the names of these controls to something that's not
    affected by the alsa restore mechanism,
  * or remove them as mixer controls, but make them accessible some
    other way - e.g. device tree.

Howard Mitchell

       reply	other threads:[~2015-03-13 12:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <5500DE5B.2020401@hmbedded.co.uk>
2015-03-13 12:41 ` Howard Mitchell [this message]
2015-03-13 18:27   ` pcm512x driver: Mixer control naming issue Mark Brown
2015-03-15 22:28     ` Howard Mitchell
2015-03-16  7:47       ` Takashi Iwai
2015-03-16  9:47         ` Howard Mitchell
2015-03-16 10:11           ` Takashi Iwai
2015-03-16 11:38       ` Mark Brown
2015-03-16 11:59         ` Takashi Iwai
2015-03-16 17:37         ` Howard Mitchell
2015-03-17 17:23           ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5502DAE1.30609@hmbedded.co.uk \
    --to=hm@hmbedded.co.uk \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=gordon.garrity@gmail.com \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.