Skip to contentSkip to conversation

usb-audio: Fix comment

PATCH In review Mark Hills 2 participants 2 messages May 11, 2012 Sound

lore
Share & tools
lore

Mark Hills

author
#0 lore raw

PATCH 1/1 usb-audio: Fix comment

Explained by Takashi in <s5hfwbtmz0q.wl%[email protected]>

Quoted 3 lines

The reason is because get_min_max*() isn't called in the place you created these controls, and get_min_max() would be called only for integer volumes later even if uninitialized. A short cut for booleans.

---
 sound/usb/mixer_quirks.c |   12 ++----------
 1 files changed, 2 insertions(+), 10 deletions(-)
sound/usb/mixer_quirks.c +2 -10
index 12125ca..41f4b69 100644
@@ -79,16 +79,8 @@ static int snd_create_std_mono_ctl(struct usb_mixer_interface *mixer,
 	cval->control = control;
 	cval->cmask = cmask;
 
-	/* FIXME: Do we need this?
-	 * The following values are for compatibility with
-	 * Ebox-44 mixer.
-	 * But the corresponding ebox-44 function says:
-	 *    "Volume controls will override these values"
-	 *
-	 * These values don't have any effect at all for
-	 * M-Audio FTUs.
-	 * So I think, we can safely omit the range settings here.
-	 */
+	/* get_min_max() is called only for integer volumes later,
+	 * so provide a short-cut for booleans */
 	cval->min = 0;
 	cval->max = 1;
 	cval->res = 0;
Signature · 1 line
1.7.4.4
#1 lore raw

At Fri, 11 May 2012 18:31:55 +0100,

Quoted 8 lines · Mark Hills

Explained by Takashi in <s5hfwbtmz0q.wl%[email protected]>

Quoted 3 lines

The reason is because get_min_max*() isn't called in the place you created these controls, and get_min_max() would be called only for integer volumes later even if uninitialized. A short cut for booleans.

Applied now. Thanks.

Takashi

Quoted 30 lines
---
 sound/usb/mixer_quirks.c |   12 ++----------
 1 files changed, 2 insertions(+), 10 deletions(-)
sound/usb/mixer_quirks.c +2 -10
index 12125ca..41f4b69 100644
@@ -79,16 +79,8 @@ static int snd_create_std_mono_ctl(struct usb_mixer_interface *mixer,
 	cval->control = control;
 	cval->cmask = cmask;
 
-	/* FIXME: Do we need this?
-	 * The following values are for compatibility with
-	 * Ebox-44 mixer.
-	 * But the corresponding ebox-44 function says:
-	 *    "Volume controls will override these values"
-	 *
-	 * These values don't have any effect at all for
-	 * M-Audio FTUs.
-	 * So I think, we can safely omit the range settings here.
-	 */
+	/* get_min_max() is called only for integer volumes later,
+	 * so provide a short-cut for booleans */
 	cval->min = 0;
 	cval->max = 1;
 	cval->res = 0;
Signature · 1 line
1.7.4.4