提交 85b741c1 编写于 作者: T Takashi Iwai

ALSA: usb-audio: Add minimal-mute notion in dB mapping table

Some devices do mute the volume at the minimal volume, and for such
devices, we need to set SNDRV_CTL_TLVT_DB_MINMAX_MUTE to the TLV
information.  It corresponds to setting usb_mixer_elem_info.min_mute
flag in the USB-audio driver.

This patch adds a new field min_mute in usbmix_dB_map so that the
mixer map entry can pass the flag.

Link: https://lore.kernel.org/r/20211116065415.11159-3-tiwai@suse.deSigned-off-by: NTakashi Iwai <tiwai@suse.de>
上级 fd23116d
...@@ -145,6 +145,7 @@ static inline void check_mapped_dB(const struct usbmix_name_map *p, ...@@ -145,6 +145,7 @@ static inline void check_mapped_dB(const struct usbmix_name_map *p,
if (p && p->dB) { if (p && p->dB) {
cval->dBmin = p->dB->min; cval->dBmin = p->dB->min;
cval->dBmax = p->dB->max; cval->dBmax = p->dB->max;
cval->min_mute = p->dB->min_mute;
cval->initialized = 1; cval->initialized = 1;
} }
} }
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
struct usbmix_dB_map { struct usbmix_dB_map {
int min; int min;
int max; int max;
bool min_mute;
}; };
struct usbmix_name_map { struct usbmix_name_map {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册