Skip to content

Commit 85b741c

Browse files
committed
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.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent fd23116 commit 85b741c

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

sound/usb/mixer.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ static inline void check_mapped_dB(const struct usbmix_name_map *p,
145145
if (p && p->dB) {
146146
cval->dBmin = p->dB->min;
147147
cval->dBmax = p->dB->max;
148+
cval->min_mute = p->dB->min_mute;
148149
cval->initialized = 1;
149150
}
150151
}

sound/usb/mixer_maps.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
struct usbmix_dB_map {
99
int min;
1010
int max;
11+
bool min_mute;
1112
};
1213

1314
struct usbmix_name_map {

0 commit comments

Comments
 (0)