sound/usb: add dB range mapping quirks.
PATCH 1/1 sound/usb: add dB range mapping quirks.
Some usb audio devices don't follow the specification of the volume range. Add dB_mapping_quirks to fix some devices' dB ranges so that the function snd_mixer_selem_set_playback_dB in alsa-lib can set the correct value for those devices.
--- sound/usb/mixer.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)
sound/usb/mixer.c +30 -0
@@ -933,6 +933,32 @@ static void volume_control_quirks(struct usb_mixer_elem_info *cval, } } +/* dB mapping quirks */ +static void dB_mapping_quirks (struct usb_mixer_elem_info *cval, +struct snd_kcontrol *kctl) +{ +switch (cval->mixer->chip->usb_id) { +case USB_ID (0x05a7 ,0x1020 ):/* Bose Companion 5 */ +if (strcmp (kctl->id.name,"PCM Playback Volume" ) ==0 ) { + cval->dBmin = (convert_signed_value (cval, cval->min) *100 ) /16 ; + cval->dBmax = (convert_signed_value (cval, cval->max) *100 ) /16 ; + } +break ; +case USB_ID (0x21b4 ,0x0081 ):/* Dragonfly DAC 1.2 */ +if (strcmp (kctl->id.name,"PCM Playback Volume" ) ==0 ) { + cval->dBmin =convert_signed_value (cval, cval->min) *100 ; + cval->dBmax =convert_signed_value (cval, cval->max) *100 ; + } +break ; +case USB_ID (0x046d ,0x0a29 ):/* Logitech H800 */ +if (strcmp (kctl->id.name,"PCM Playback Volume" ) ==0 ) { + cval->dBmin =convert_signed_value (cval, cval->min); + cval->dBmax =convert_signed_value (cval, cval->max); + } +break ; + } +} +/* * retrieve the minimum and maximum values for the specified control */
@@ -1027,6 +1053,10 @@ static int get_min_max_with_quirks(struct usb_mixer_elem_info *cval,*/ cval->dBmin = (convert_signed_value (cval, cval->min) *100 ) /256 ; cval->dBmax = (convert_signed_value (cval, cval->max) *100 ) /256 ; + +if (kctl) +dB_mapping_quirks (cval, kctl); +if (cval->dBmin > cval->dBmax) {/* something is wrong; assume it's either from/to 0dB */ if (cval->dBmin <0 )
Signature · 1 line
2.5.0.rc2.392.g76e840b
Quoted 7 lines · Yao-Wen Mao
Some usb audio devices don't follow the specification of the volume range. Add
dB_mapping_quirksto fix some devices' dB ranges so that the functionsnd_mixer_selem_set_playback_dBin alsa-lib can set the correct value for those devices.Signed-off-by Yao-Wen Mao <[email protected]>
This can be done also by adding to mixer_maps.c.
The map doesn't have to contain the name string but only with a dB entry (I think).
OTOH, this patch shows the value factor to be corrected, so it may make more sense -- people can look at these as a reference.
One thing I wonder, though: can it be simplified by introducing the dB conversion factor instead? Do these devices have other FUs that have a different volume factor?
thanks,
Takashi
Quoted 56 lines
--- sound/usb/mixer.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)sound/usb/mixer.c +30
-0@@ -933,6 +933,32 @@ static void volume_control_quirks(struct usb_mixer_elem_info *cval, } } +/* dB mapping quirks */ +static void dB_mapping_quirks (struct usb_mixer_elem_info *cval, +struct snd_kcontrol *kctl) +{ +switch (cval->mixer->chip->usb_id) { +case USB_ID (0x05a7 ,0x1020 ):/* Bose Companion 5 */ +if (strcmp (kctl->id.name,"PCM Playback Volume" ) ==0 ) { + cval->dBmin = (convert_signed_value (cval, cval->min) *100 ) /16 ; + cval->dBmax = (convert_signed_value (cval, cval->max) *100 ) /16 ; + } +break ; +case USB_ID (0x21b4 ,0x0081 ):/* Dragonfly DAC 1.2 */ +if (strcmp (kctl->id.name,"PCM Playback Volume" ) ==0 ) { + cval->dBmin =convert_signed_value (cval, cval->min) *100 ; + cval->dBmax =convert_signed_value (cval, cval->max) *100 ; + } +break ; +case USB_ID (0x046d ,0x0a29 ):/* Logitech H800 */ +if (strcmp (kctl->id.name,"PCM Playback Volume" ) ==0 ) { + cval->dBmin =convert_signed_value (cval, cval->min); + cval->dBmax =convert_signed_value (cval, cval->max); + } +break ; + } +} +/* * retrieve the minimum and maximum values for the specified control */ @@ -1027,6 +1053,10 @@ static int get_min_max_with_quirks(struct usb_mixer_elem_info *cval,*/ cval->dBmin = (convert_signed_value (cval, cval->min) *100 ) /256 ; cval->dBmax = (convert_signed_value (cval, cval->max) *100 ) /256 ; + +if (kctl) +dB_mapping_quirks (cval, kctl); +if (cval->dBmin > cval->dBmax) {/* something is wrong; assume it's either from/to 0dB */ if (cval->dBmin <0 )Signature · 1 line
2.5.0.rc2.392.g76e840b
Thanks for the reply!
Some usb audio devices don't follow the standard specification. (1/256 dB) I think introducing the dB conversion factor may be a good idea. Also I think mixer_maps.c is a good place to do this.
By the way, I can't figure out the meanings of FU, MU, SU, ... etc. Could you tell me the meanings of them?
(I guess FUs are units which have volume controls?)
The devices which I tested has only one volume control shown in alsamixer. I don't know if there are some devices have more than one volume factor.
thanks again,
Yao-Wen
Quoted 91 lines · Takashi Iwai
Quoted 7 lines · Yao-Wen Mao
Some usb audio devices don't follow the specification of the volume range. Add
dB_mapping_quirksto fix some devices' dB ranges so that the functionsnd_mixer_selem_set_playback_dBin alsa-lib can set the correct value for those devices.Signed-off-by Yao-Wen Mao <[email protected]>This can be done also by adding to
mixer_maps.c.
The map doesn't have to contain the name string but only with a dB entry (I think).OTOH, this patch shows the value factor to be corrected, so it may make more sense -- people can look at these as a reference.
One thing I wonder, though: can it be simplified by introducing the dB conversion factor instead? Do these devices have other FUs that have a different volume factor?
thanks,
Takashi
sound/usb/mixer.c static void volume_control_quirks(struct
Quoted 9 lines
--- sound/usb/mixer.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)sound/usb/mixer.c +0
-0@@ -933,6 +933,32 @@ static void volume_control_quirks(struct
usb_mixer_elem_info*cval,sound/usb/mixer.c static void volume_control_quirks(struct usb_mixer_elem_info *cval,
Quoted 11 lines
sound/usb/mixer.c +8
-0} } +/* dB mapping quirks */ +static void dB_mapping_quirks (struct usb_mixer_elem_info *cval, +struct snd_kcontrol *kctl) +{ +switch (cval->mixer->chip->usb_id) { +case USB_ID (0x05a7 ,0x1020 ):/* Bose Companion 5 */ +if (strcmp (kctl->id.name,"PCM Playback Volume" ) ==0 ) { + cval->dBmin = (convert_signed_value(cval,
cval->min) * 100) / 16;sound/usb/mixer.c static void volume_control_quirks(struct · line 944
Quoted 1 line
sound/usb/mixer.c +1
-0+ cval->dBmax = (convert_signed_value(cval,
cval->max) * 100) / 16;sound/usb/mixer.c static void volume_control_quirks(struct usb_mixer_elem_info *cval,
Quoted 5 lines
sound/usb/mixer.c +5
-0+ } +break ; +case USB_ID (0x21b4 ,0x0081 ):/* Dragonfly DAC 1.2 */ +if (strcmp (kctl->id.name,"PCM Playback Volume" ) ==0 ) { + cval->dBmin = convert_signed_value(cval,
cval->min) * 100;sound/usb/mixer.c static void volume_control_quirks(struct · line 950
Quoted 1 line
sound/usb/mixer.c +1
-0+ cval->dBmax = convert_signed_value(cval,
cval->max) * 100;sound/usb/mixer.c static void volume_control_quirks(struct usb_mixer_elem_info *cval,
Quoted 5 lines
sound/usb/mixer.c +5
-0+ } +break ; +case USB_ID (0x046d ,0x0a29 ):/* Logitech H800 */ +if (strcmp (kctl->id.name,"PCM Playback Volume" ) ==0 ) { + cval->dBmin = convert_signed_value(cval,
cval->min);sound/usb/mixer.c static void volume_control_quirks(struct · line 956
Quoted 1 line
sound/usb/mixer.c +1
-0+ cval->dBmax = convert_signed_value(cval,
cval->max);sound/usb/mixer.c static int get_min_max_with_quirks(struct
Quoted 9 lines
sound/usb/mixer.c +5
-0+ } +break ; + } +} +/* * retrieve the minimum and maximum values for the specified control */ @@ -1027,6 +1053,10 @@ static int get_min_max_with_quirks(struct
usb_mixer_elem_info*cval,Quoted 14 lines
sound/usb/mixer.c +4
-1*/ cval->dBmin = (convert_signed_value (cval, cval->min) *100 ) /256 ; cval->dBmax = (convert_signed_value (cval, cval->max) *100 ) /256 ; + +if (kctl) +dB_mapping_quirks (cval, kctl); +if (cval->dBmin > cval->dBmax) {/* something is wrong; assume it's either from/to 0dB */ if (cval->dBmin <0 ) --2.5.0.rc2.392.g76e840b
Quoted 10 lines · Yao-Wen Mao
Thanks for the reply!
Some usb audio devices don't follow the standard specification. (1/256 dB) I think introducing the dB conversion factor may be a good idea. Also I think
mixer_maps.cis a good place to do this.By the way, I can't figure out the meanings of FU, MU, SU, ... etc. Could you tell me the meanings of them?
(I guess FUs are units which have volume controls?)
FU = Feature Unit
MU = Mixer Unit
SU = Selector Unit
Takashi
Quoted 103 lines
The devices which I tested has only one volume control shown in alsamixer. I don't know if there are some devices have more than one volume factor.
thanks again,
Yao-Wen
Quoted 76 lines · Takashi Iwai
Quoted 7 lines · Yao-Wen Mao
Some usb audio devices don't follow the specification of the volume range. Add
dB_mapping_quirksto fix some devices' dB ranges so that the functionsnd_mixer_selem_set_playback_dBin alsa-lib can set the correct value for those devices.Signed-off-by Yao-Wen Mao <[email protected]>This can be done also by adding to
mixer_maps.c.
The map doesn't have to contain the name string but only with a dB entry (I think).OTOH, this patch shows the value factor to be corrected, so it may make more sense -- people can look at these as a reference.
One thing I wonder, though: can it be simplified by introducing the dB conversion factor instead? Do these devices have other FUs that have a different volume factor?
thanks,
Takashi
sound/usb/mixer.c static void volume_control_quirks(struct
Quoted 9 lines
--- sound/usb/mixer.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)sound/usb/mixer.c +0
-0@@ -933,6 +933,32 @@ static void volume_control_quirks(struct
usb_mixer_elem_info*cval,sound/usb/mixer.c static void volume_control_quirks(struct usb_mixer_elem_info *cval,
Quoted 11 lines
sound/usb/mixer.c +8
-0} } +/* dB mapping quirks */ +static void dB_mapping_quirks (struct usb_mixer_elem_info *cval, +struct snd_kcontrol *kctl) +{ +switch (cval->mixer->chip->usb_id) { +case USB_ID (0x05a7 ,0x1020 ):/* Bose Companion 5 */ +if (strcmp (kctl->id.name,"PCM Playback Volume" ) ==0 ) { + cval->dBmin = (convert_signed_value(cval,
cval->min) * 100) / 16;sound/usb/mixer.c static void volume_control_quirks(struct · line 944
Quoted 1 line
sound/usb/mixer.c +1
-0+ cval->dBmax = (convert_signed_value(cval,
cval->max) * 100) / 16;sound/usb/mixer.c static void volume_control_quirks(struct usb_mixer_elem_info *cval,
Quoted 5 lines
sound/usb/mixer.c +5
-0+ } +break ; +case USB_ID (0x21b4 ,0x0081 ):/* Dragonfly DAC 1.2 */ +if (strcmp (kctl->id.name,"PCM Playback Volume" ) ==0 ) { + cval->dBmin = convert_signed_value(cval,
cval->min) * 100;sound/usb/mixer.c static void volume_control_quirks(struct · line 950
Quoted 1 line
sound/usb/mixer.c +1
-0+ cval->dBmax = convert_signed_value(cval,
cval->max) * 100;sound/usb/mixer.c static void volume_control_quirks(struct usb_mixer_elem_info *cval,
Quoted 5 lines
sound/usb/mixer.c +5
-0+ } +break ; +case USB_ID (0x046d ,0x0a29 ):/* Logitech H800 */ +if (strcmp (kctl->id.name,"PCM Playback Volume" ) ==0 ) { + cval->dBmin = convert_signed_value(cval,
cval->min);sound/usb/mixer.c static void volume_control_quirks(struct · line 956
Quoted 1 line
sound/usb/mixer.c +1
-0+ cval->dBmax = convert_signed_value(cval,
cval->max);sound/usb/mixer.c static int get_min_max_with_quirks(struct
Quoted 9 lines
sound/usb/mixer.c +5
-0+ } +break ; + } +} +/* * retrieve the minimum and maximum values for the specified control */ @@ -1027,6 +1053,10 @@ static int get_min_max_with_quirks(struct
usb_mixer_elem_info*cval,Quoted 15 lines
Quoted 11 lines
sound/usb/mixer.c +4
-1*/ cval->dBmin = (convert_signed_value (cval, cval->min) *100 ) /256 ; cval->dBmax = (convert_signed_value (cval, cval->max) *100 ) /256 ; + +if (kctl) +dB_mapping_quirks (cval, kctl); +if (cval->dBmin > cval->dBmax) {/* something is wrong; assume it's either from/to 0dB */ if (cval->dBmin <0 ) --Quoted 3 lines
2.5.0.rc2.392.g76e840b
[2 <text/html; UTF-8 (quoted-printable)>]
Quoted 10 lines · Takashi Iwai
Quoted 4 lines · Yao-Wen Mao
Thanks for the reply!
Some usb audio devices don't follow the standard specification. (1/256
dB)
Quoted 3 lines
I think introducing the dB conversion factor may be a good idea. Also I think
mixer_maps.cis a good place to do this.
Quoted 7 lines
Quoted 3 lines
By the way, I can't figure out the meanings of FU, MU, SU, ... etc. Could you tell me the meanings of them?
(I guess FUs are units which have volume controls?)FU = Feature Unit
MU = Mixer Unit
SU = Selector Unit
Got it.
I will do this in mixer_maps.c and send PATCH v2.
Do I need to introduce the dB conversion factor?
Or just add the corresponding dBmin and dBmax?
thanks,
Yao-Wen
Quoted 111 lines
Quoted 1 line
The devices which I tested has only one volume control shown in
alsamixer.
Quoted 48 lines
I don't know if there are some devices have more than one volume factor.
thanks again,
Yao-Wen
Quoted 39 lines · Takashi Iwai
Quoted 7 lines · Yao-Wen Mao
Some usb audio devices don't follow the specification of the volume range. Add
dB_mapping_quirksto fix some devices' dB ranges so that the functionsnd_mixer_selem_set_playback_dBin alsa-lib can set the correct value for those devices.Signed-off-by Yao-Wen Mao <[email protected]>This can be done also by adding to
mixer_maps.c.
The map doesn't have to contain the name string but only with a dB entry (I think).OTOH, this patch shows the value factor to be corrected, so it may make more sense -- people can look at these as a reference.
One thing I wonder, though: can it be simplified by introducing the dB conversion factor instead? Do these devices have other FUs that have a different volume factor?
thanks,
Takashi
sound/usb/mixer.c static void volume_control_quirks(struct
Quoted 9 lines
--- sound/usb/mixer.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)sound/usb/mixer.c +0
-0@@ -933,6 +933,32 @@ static void volume_control_quirks(struct
usb_mixer_elem_info*cval,Quoted 3 lines
sound/usb/mixer.c +0
-0} }Quoted 7 lines
Quoted 7 lines
sound/usb/mixer.c static void volume_control_quirks(struct usb_mixer_elem_info *cval,
Quoted 7 lines
sound/usb/mixer.c +7
-0+/* dB mapping quirks */ +static void dB_mapping_quirks (struct usb_mixer_elem_info *cval, +struct snd_kcontrol *kctl) +{ +switch (cval->mixer->chip->usb_id) { +case USB_ID (0x05a7 ,0x1020 ):/* Bose Companion 5 */ + if (strcmp(kctl->id.name, "PCM Playback Volume") ==0) {
Quoted 8 lines
Quoted 8 lines
sound/usb/mixer.c static void volume_control_quirks(struct · line 943
Quoted 1 line
sound/usb/mixer.c +1
-0+ cval->dBmin = (convert_signed_value(cval,
cval->min) * 100) / 16;sound/usb/mixer.c static void volume_control_quirks(struct · line 944
Quoted 1 line
sound/usb/mixer.c +1
-0+ cval->dBmax = (convert_signed_value(cval,
cval->max) * 100) / 16;Quoted 4 lines
sound/usb/mixer.c +4
-0+ } +break ; +case USB_ID (0x21b4 ,0x0081 ):/* Dragonfly DAC 1.2 */ + if (strcmp(kctl->id.name, "PCM Playback Volume") ==0) {
Quoted 8 lines
Quoted 8 lines
sound/usb/mixer.c static void volume_control_quirks(struct · line 949
Quoted 1 line
sound/usb/mixer.c +1
-0+ cval->dBmin = convert_signed_value(cval,
cval->min) * 100;sound/usb/mixer.c static void volume_control_quirks(struct · line 950
Quoted 1 line
sound/usb/mixer.c +1
-0+ cval->dBmax = convert_signed_value(cval,
cval->max) * 100;Quoted 4 lines
sound/usb/mixer.c +4
-0+ } +break ; +case USB_ID (0x046d ,0x0a29 ):/* Logitech H800 */ + if (strcmp(kctl->id.name, "PCM Playback Volume") ==0) {
Quoted 14 lines
Quoted 14 lines
sound/usb/mixer.c static void volume_control_quirks(struct · line 955
Quoted 1 line
sound/usb/mixer.c +1
-0+ cval->dBmin = convert_signed_value(cval,
cval->min);sound/usb/mixer.c static void volume_control_quirks(struct · line 956
Quoted 1 line
sound/usb/mixer.c +1
-0+ cval->dBmax = convert_signed_value(cval,
cval->max);sound/usb/mixer.c static int get_min_max_with_quirks(struct
Quoted 9 lines
sound/usb/mixer.c +5
-0+ } +break ; + } +} +/* * retrieve the minimum and maximum values for the specified control */ @@ -1027,6 +1053,10 @@ static int get_min_max_with_quirks(struct
usb_mixer_elem_info*cval,Quoted 2 lines
Quoted 2 lines
sound/usb/mixer.c static int get_min_max_with_quirks(struct · line 1054
Quoted 2 lines
sound/usb/mixer.c +0
-0*/ cval->dBmin = (convert_signed_value(cval, cval->min) * 100) /256;
Quoted 1 line
Quoted 1 line
sound/usb/mixer.c static int get_min_max_with_quirks(struct · line 1055
Quoted 1 line
sound/usb/mixer.c +0
-0cval->dBmax = (convert_signed_value(cval, cval->max) * 100) /256;
Quoted 6 lines
Quoted 6 lines
sound/usb/mixer.c static int get_min_max_with_quirks(struct usb_mixer_elem_info *cval,
Quoted 6 lines
sound/usb/mixer.c +4
-0+ +if (kctl) +dB_mapping_quirks (cval, kctl); +if (cval->dBmin > cval->dBmax) {/* something is wrong; assume it's either from/to 0dB */
Quoted 8 lines
Quoted 6 lines
Quoted 5 lines
sound/usb/mixer.c +0
-1if (cval->dBmin <0 ) --2.5.0.rc2.392.g76e840b
[2 <text/html; UTF-8 (quoted-printable)>]
Quoted 22 lines · Yao-Wen Mao
Quoted 10 lines · Takashi Iwai
Quoted 4 lines · Yao-Wen Mao
Thanks for the reply!
Some usb audio devices don't follow the standard specification. (1/256
dB)
Quoted 3 lines
I think introducing the dB conversion factor may be a good idea. Also I think
mixer_maps.cis a good place to do this.Quoted 7 lines
Quoted 3 lines
By the way, I can't figure out the meanings of FU, MU, SU, ... etc. Could you tell me the meanings of them?
(I guess FUs are units which have volume controls?)FU = Feature Unit
MU = Mixer Unit
SU = Selector Unit
Quoted 5 lines
Got it.
I will do this in
mixer_maps.cand send PATCH v2.
Do I need to introduce the dB conversion factor?
Or just add the corresponding dBmin and dBmax?
I think it'd be enough to use dBmin/max as a first step, but it's still helpful to write the dB scale correction in comments.
thanks,
Takashi
Quoted 119 lines
thanks,
Yao-Wen
Quoted 111 lines
Quoted 1 line
The devices which I tested has only one volume control shown in
alsamixer.
Quoted 48 lines
I don't know if there are some devices have more than one volume factor.
thanks again,
Yao-Wen
Quoted 39 lines · Takashi Iwai
Quoted 7 lines · Yao-Wen Mao
Some usb audio devices don't follow the specification of the volume range. Add
dB_mapping_quirksto fix some devices' dB ranges so that the functionsnd_mixer_selem_set_playback_dBin alsa-lib can set the correct value for those devices.Signed-off-by Yao-Wen Mao <[email protected]>This can be done also by adding to
mixer_maps.c.
The map doesn't have to contain the name string but only with a dB entry (I think).OTOH, this patch shows the value factor to be corrected, so it may make more sense -- people can look at these as a reference.
One thing I wonder, though: can it be simplified by introducing the dB conversion factor instead? Do these devices have other FUs that have a different volume factor?
thanks,
Takashi
sound/usb/mixer.c static void volume_control_quirks(struct
Quoted 9 lines
--- sound/usb/mixer.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)sound/usb/mixer.c +0
-0@@ -933,6 +933,32 @@ static void volume_control_quirks(struct
usb_mixer_elem_info*cval,Quoted 3 lines
sound/usb/mixer.c +0
-0} }Quoted 7 lines
Quoted 7 lines
sound/usb/mixer.c static void volume_control_quirks(struct usb_mixer_elem_info *cval,
Quoted 7 lines
sound/usb/mixer.c +7
-0+/* dB mapping quirks */ +static void dB_mapping_quirks (struct usb_mixer_elem_info *cval, +struct snd_kcontrol *kctl) +{ +switch (cval->mixer->chip->usb_id) { +case USB_ID (0x05a7 ,0x1020 ):/* Bose Companion 5 */ + if (strcmp(kctl->id.name, "PCM Playback Volume") ==0) {
Quoted 8 lines
Quoted 8 lines
sound/usb/mixer.c static void volume_control_quirks(struct · line 943
Quoted 1 line
sound/usb/mixer.c +1
-0+ cval->dBmin = (convert_signed_value(cval,
cval->min) * 100) / 16;sound/usb/mixer.c static void volume_control_quirks(struct · line 944
Quoted 1 line
sound/usb/mixer.c +1
-0+ cval->dBmax = (convert_signed_value(cval,
cval->max) * 100) / 16;Quoted 4 lines
sound/usb/mixer.c +4
-0+ } +break ; +case USB_ID (0x21b4 ,0x0081 ):/* Dragonfly DAC 1.2 */ + if (strcmp(kctl->id.name, "PCM Playback Volume") ==0) {
Quoted 8 lines
Quoted 8 lines
sound/usb/mixer.c static void volume_control_quirks(struct · line 949
Quoted 1 line
sound/usb/mixer.c +1
-0+ cval->dBmin = convert_signed_value(cval,
cval->min) * 100;sound/usb/mixer.c static void volume_control_quirks(struct · line 950
Quoted 1 line
sound/usb/mixer.c +1
-0+ cval->dBmax = convert_signed_value(cval,
cval->max) * 100;Quoted 4 lines
sound/usb/mixer.c +4
-0+ } +break ; +case USB_ID (0x046d ,0x0a29 ):/* Logitech H800 */ + if (strcmp(kctl->id.name, "PCM Playback Volume") ==0) {
Quoted 14 lines
Quoted 14 lines
sound/usb/mixer.c static void volume_control_quirks(struct · line 955
Quoted 1 line
sound/usb/mixer.c +1
-0+ cval->dBmin = convert_signed_value(cval,
cval->min);sound/usb/mixer.c static void volume_control_quirks(struct · line 956
Quoted 1 line
sound/usb/mixer.c +1
-0+ cval->dBmax = convert_signed_value(cval,
cval->max);sound/usb/mixer.c static int get_min_max_with_quirks(struct
Quoted 9 lines
sound/usb/mixer.c +5
-0+ } +break ; + } +} +/* * retrieve the minimum and maximum values for the specified control */ @@ -1027,6 +1053,10 @@ static int get_min_max_with_quirks(struct
usb_mixer_elem_info*cval,Quoted 2 lines
Quoted 2 lines
sound/usb/mixer.c static int get_min_max_with_quirks(struct · line 1054
Quoted 2 lines
sound/usb/mixer.c +0
-0*/ cval->dBmin = (convert_signed_value(cval, cval->min) * 100) /256;
Quoted 1 line
Quoted 1 line
sound/usb/mixer.c static int get_min_max_with_quirks(struct · line 1055
Quoted 1 line
sound/usb/mixer.c +0
-0cval->dBmax = (convert_signed_value(cval, cval->max) * 100) /256;
Quoted 6 lines
Quoted 6 lines
sound/usb/mixer.c static int get_min_max_with_quirks(struct usb_mixer_elem_info *cval,
Quoted 6 lines
sound/usb/mixer.c +4
-0+ +if (kctl) +dB_mapping_quirks (cval, kctl); +if (cval->dBmin > cval->dBmax) {/* something is wrong; assume it's either from/to 0dB */
Quoted 8 lines
Quoted 6 lines
Quoted 5 lines
sound/usb/mixer.c +0
-1if (cval->dBmin <0 ) --2.5.0.rc2.392.g76e840b
[2 <text/html; UTF-8 (quoted-printable)>]