android_kernel_google_msm/sound
Anssi Hannula d359d1d221 ALSA: usb-audio: Add a more accurate volume quirk for AudioQuest DragonFly
commit 42e3121d90f42e57f6dbd6083dff2f57b3ec7daa upstream.

AudioQuest DragonFly DAC reports a volume control range of 0..50
(0x0000..0x0032) which in USB Audio means a range of 0 .. 0.2dB, which
is obviously incorrect and would cause software using the dB information
in e.g. volume sliders to have a massive volume difference in 100..102%
range.

Commit 2d1cb7f658fb ("ALSA: usb-audio: add dB range mapping for some
devices") added a dB range mapping for it with range 0..50 dB.

However, the actual volume mapping seems to be neither linear volume nor
linear dB scale, but instead quite close to the cubic mapping e.g.
alsamixer uses, with a range of approx. -53...0 dB.

Replace the previous quirk with a custom dB mapping based on some basic
output measurements, using a 10-item range TLV (which will still fit in
alsa-lib MAX_TLV_RANGE_SIZE).

Tested on AudioQuest DragonFly HW v1.2. The quirk is only applied if the
range is 0..50, so if this gets fixed/changed in later HW revisions it
will no longer be applied.

v2: incorporated Takashi Iwai's suggestion for the quirk application
method

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
[lizf: Backoported to 3.4: use dev_info() instead of usb_audio_info()]
Signed-off-by: Zefan Li <lizefan@huawei.com>
2016-03-21 09:17:58 +08:00
..
aoa
arm ALSA: pxa2xx: Fix unlocked snd_pcm_stop() call 2014-03-11 16:10:09 -07:00
atmel dmaengine/dw_dmac: Fix dw_dmac user drivers to adapt to slave_config changes 2012-02-22 18:15:39 +05:30
core ALSA: control: Add sanity checks for user ctl id name string 2015-06-19 11:40:24 +08:00
drivers ALSA: pcsp: Fix the order of input device unregistration 2014-04-14 06:44:31 -07:00
firewire IEEE 1394 (FireWire) subsystem updates post v3.3: 2012-03-22 20:31:15 -07:00
i2c ALSA: ak411x: Fix stall in work callback 2015-04-14 17:33:59 +08:00
isa ALSA: msnd: Avoid duplicated driver name 2013-11-29 10:50:34 -08:00
mips
oss sound: Fix make allmodconfig on MIPS correctly 2013-08-20 08:26:27 -07:00
parisc
pci ALSA: hda/realtek - Add a fixup for another Acer Aspire 9420 2015-09-18 09:20:44 +08:00
pcmcia
ppc
sh
soc ASoC: wm8960: the enum of "DAC Polarity" should be wm8960_enum[1] 2015-10-22 09:20:04 +08:00
sparc
spi
synth ALSA: emux: Fix mutex deadlock in OSS emulation 2015-09-18 09:20:34 +08:00
usb ALSA: usb-audio: Add a more accurate volume quirk for AudioQuest DragonFly 2016-03-21 09:17:58 +08:00
ac97_bus.c
Kconfig
last.c ALSA: workaround: change the timing of alsa_sound_last_init() 2012-04-19 13:51:54 +02:00
Makefile
sound_core.c
sound_firmware.c