PERFORCE change 170553 for review

View: New views
1 Messages — Rating Filter:   Alert me  

PERFORCE change 170553 for review

by Hans Petter Selasky-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://p4web.freebsd.org/chv.cgi?CH=170553

Change 170553 by hselasky@hselasky_laptop001 on 2009/11/12 16:20:44

       
        USB audio:
          - remove volume alignment (was previously not correctly implemented)
          - reported by: Jaakko Heinonen, jh @

Affected files ...

.. //depot/projects/usb/src/sys/dev/sound/usb/uaudio.c#61 edit

Differences ...

==== //depot/projects/usb/src/sys/dev/sound/usb/uaudio.c#61 (text+ko) ====

@@ -118,7 +118,6 @@
  int32_t maxval;
 #define MIX_MAX_CHAN 8
  int32_t wValue[MIX_MAX_CHAN]; /* using nchan */
- uint32_t mod; /* modulus */
  uint32_t mul;
  uint32_t ctl;
 
@@ -1573,9 +1572,7 @@
  if (mc->type == MIX_ON_OFF) {
  mc->minval = 0;
  mc->maxval = 1;
- mc->mod = 1;
  } else if (mc->type == MIX_SELECTOR) {
- mc->mod = 1;
  } else {
 
  /* determine min and max values */
@@ -1603,11 +1600,8 @@
 
  /* compute value alignment */
  res = uaudio_mixer_get(sc->sc_udev, GET_RES, mc);
- if (res == 0)
- res = 1;
- mc->mod = mc->mul / res;
- if (mc->mod == 0)
- mc->mod = 1;
+
+ DPRINTF("Resolution = %d\n", (int)res);
  }
 
  uaudio_mixer_add_ctl_sub(sc, mc);
@@ -3100,9 +3094,6 @@
  /* compute actual volume */
  val = (val * mc->mul) / 255;
 
- /* align volume level */
- val = val - (val % mc->mod);
-
  /* add lower offset */
  val = val + mc->minval;
 
_______________________________________________
p4-projects@... mailing list
http://lists.freebsd.org/mailman/listinfo/p4-projects
To unsubscribe, send any mail to "p4-projects-unsubscribe@..."