• Anssi Hannula's avatar
    ALSA: usb-audio: Add a more accurate volume quirk for AudioQuest DragonFly · 42e3121d
    Anssi Hannula authored
    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 2d1cb7f6 ("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: default avatarAnssi Hannula <anssi.hannula@iki.fi>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
    42e3121d
Name
Last commit
Last update
..
aoa Loading commit data...
arm Loading commit data...
atmel Loading commit data...
core Loading commit data...
drivers Loading commit data...
firewire Loading commit data...
hda Loading commit data...
i2c Loading commit data...
isa Loading commit data...
mips Loading commit data...
oss Loading commit data...
parisc Loading commit data...
pci Loading commit data...
pcmcia Loading commit data...
ppc Loading commit data...
sh Loading commit data...
soc Loading commit data...
sparc Loading commit data...
spi Loading commit data...
synth Loading commit data...
usb Loading commit data...
Kconfig Loading commit data...
Makefile Loading commit data...
ac97_bus.c Loading commit data...
last.c Loading commit data...
sound_core.c Loading commit data...
sound_firmware.c Loading commit data...