X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=sound%2Fusb%2Fusbmixer_maps.c;h=d93fc89beba8aee1040164bccff3935f0a78524d;hb=7b1eda223debcba706ab989a09c4eecb327aebdf;hp=77c35885e21cf40653076729f8b1d327b28af52a;hpb=2fe77b81c77eed92c4c0439f74c8148a295b4a86;p=mirror_ubuntu-bionic-kernel.git diff --git a/sound/usb/usbmixer_maps.c b/sound/usb/usbmixer_maps.c index 77c35885e21c..d93fc89beba8 100644 --- a/sound/usb/usbmixer_maps.c +++ b/sound/usb/usbmixer_maps.c @@ -19,11 +19,16 @@ * */ +struct usbmix_dB_map { + u32 min; + u32 max; +}; struct usbmix_name_map { int id; const char *name; int control; + struct usbmix_dB_map *dB; }; struct usbmix_selector_map { @@ -72,7 +77,7 @@ static struct usbmix_name_map extigy_map[] = { { 8, "Line Playback" }, /* FU */ /* 9: IT mic */ { 10, "Mic Playback" }, /* FU */ - { 11, "Capture Input Source" }, /* SU */ + { 11, "Capture Source" }, /* SU */ { 12, "Capture" }, /* FU */ /* 13: OT pcm capture */ /* 14: MU (w/o controls) */ @@ -80,8 +85,8 @@ static struct usbmix_name_map extigy_map[] = { /* 16: MU (w/o controls) */ { 17, NULL, 1 }, /* DISABLED: PU-switch (any effect?) */ { 17, "Channel Routing", 2 }, /* PU: mode select */ - { 18, "Tone Control - Bass", USB_FEATURE_BASS }, /* FU */ - { 18, "Tone Control - Treble", USB_FEATURE_TREBLE }, /* FU */ + { 18, "Tone Control - Bass", UAC_BASS_CONTROL }, /* FU */ + { 18, "Tone Control - Treble", UAC_TREBLE_CONTROL }, /* FU */ { 18, "Master Playback" }, /* FU; others */ /* 19: OT speaker */ /* 20: OT headphone */ @@ -102,6 +107,9 @@ static struct usbmix_name_map extigy_map[] = { * e.g. no Master and fake PCM volume * Pavel Mihaylov */ +static struct usbmix_dB_map mp3plus_dB_1 = {-4781, 0}; /* just guess */ +static struct usbmix_dB_map mp3plus_dB_2 = {-1781, 618}; /* just guess */ + static struct usbmix_name_map mp3plus_map[] = { /* 1: IT pcm */ /* 2: IT mic */ @@ -110,16 +118,19 @@ static struct usbmix_name_map mp3plus_map[] = { /* 5: OT digital out */ /* 6: OT speaker */ /* 7: OT pcm capture */ - { 8, "Capture Input Source" }, /* FU, default PCM Capture Source */ + { 8, "Capture Source" }, /* FU, default PCM Capture Source */ /* (Mic, Input 1 = Line input, Input 2 = Optical input) */ { 9, "Master Playback" }, /* FU, default Speaker 1 */ /* { 10, "Mic Capture", 1 }, */ /* FU, Mic Capture */ - /* { 10, "Mic Capture", 2 }, */ /* FU, Mic Capture */ + { 10, /* "Mic Capture", */ NULL, 2, .dB = &mp3plus_dB_2 }, + /* FU, Mic Capture */ { 10, "Mic Boost", 7 }, /* FU, default Auto Gain Input */ - { 11, "Line Capture" }, /* FU, default PCM Capture */ + { 11, "Line Capture", .dB = &mp3plus_dB_2 }, + /* FU, default PCM Capture */ { 12, "Digital In Playback" }, /* FU, default PCM 1 */ - /* { 13, "Mic Playback" }, */ /* FU, default Mic Playback */ - { 14, "Line Playback" }, /* FU, default Speaker */ + { 13, /* "Mic Playback", */ .dB = &mp3plus_dB_1 }, + /* FU, default Mic Playback */ + { 14, "Line Playback", .dB = &mp3plus_dB_1 }, /* FU, default Speaker */ /* 15: MU */ { 0 } /* terminator */ };