Mailinglist Archive: opensuse-commit (1070 mails)

< Previous Next >
commit alsa-utils
  • From: root@xxxxxxxxxxxxxxx (h_root)
  • Date: Mon, 17 Sep 2007 17:07:15 +0200
  • Message-id: <20070917150715.903CB678182@xxxxxxxxxxxxxxx>

Hello community,

here is the log from the commit of package alsa-utils
checked in at Mon Sep 17 17:07:15 CEST 2007.

--------
--- alsa-utils/alsa-utils.changes       2007-08-14 16:31:53.000000000 +0200
+++ /mounts/work_src_done/STABLE/alsa-utils/alsa-utils.changes  2007-09-17 16:21:05.000000000 +0200
@@ -1,0 +2,5 @@
+Mon Sep 17 16:13:15 CEST 2007 - tiwai@xxxxxxx
+
+- fix the handling of capture enum elements in alsamixer (#325677)
+
+-------------------------------------------------------------------

New:
----
  alsa-utils-alsamixer-capture-enum-fix.diff

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ alsa-utils.spec ++++++
--- /var/tmp/diff_new_pack.e22531/_old  2007-09-17 17:06:37.000000000 +0200
+++ /var/tmp/diff_new_pack.e22531/_new  2007-09-17 17:06:37.000000000 +0200
@@ -17,13 +17,14 @@
 Group:          Productivity/Multimedia/Sound/Players
 Provides:       alsa-conf
 Requires:       dialog pciutils
-Autoreqprov:    on
+AutoReqProv:    on
 Summary:        Advanced Linux Sound Architecture Utilities
 Version:        1.0.14
-Release:        17
+Release:        24
 Source:         ftp://ftp.alsa-project.org/pub/util/alsa-utils-%{package_version}.tar.bz2
 Patch:          alsa-utils-hg-fixes.diff
-URL:            http://www.alsa-project.org/
+Patch1:         alsa-utils-alsamixer-capture-enum-fix.diff
+Url:            http://www.alsa-project.org/
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %description
@@ -40,6 +41,7 @@
 %prep
 %setup -q -n %{name}-%{package_version}
 %patch -p1
+%patch1 -p1
 mv alsamixer/README alsamixer/README-alsamixer
 %{?suse_update_config:%{suse_update_config -f .}}
 
@@ -69,6 +71,8 @@
 %{_datadir}/alsa
 
 %changelog
+* Mon Sep 17 2007 - tiwai@xxxxxxx
+- fix the handling of capture enum elements in alsamixer (#325677)
 * Tue Aug 14 2007 - tiwai@xxxxxxx
 - amixer - Allow to pass enum item string for cset, too
 - aplay - Include missing time.h for time()

++++++ alsa-utils-alsamixer-capture-enum-fix.diff ++++++
# HG changeset patch
# User tiwai
# Date 1188391795 -7200
# Node ID 803dbe88476f8a1065ce85d9efe7f61df71cf32f
# Parent  b230fef1ea76192e8cfaba252beaaca369ab085b
alsamixer - Handle capture enums separately

The capture enum controls should appear only in capture and all views.
This is a fix for Input Source enum controls.

diff -r b230fef1ea76 -r 803dbe88476f alsamixer/alsamixer.c
--- a/alsamixer/alsamixer.c     Wed Aug 15 15:38:01 2007 +0200
+++ b/alsamixer/alsamixer.c     Wed Aug 29 14:49:55 2007 +0200
@@ -210,7 +210,7 @@ enum {
   MIXER_ELEM_FRONT, MIXER_ELEM_REAR,
   MIXER_ELEM_CENTER, MIXER_ELEM_WOOFER,
   MIXER_ELEM_CAPTURE,
-  MIXER_ELEM_ENUM,
+  MIXER_ELEM_ENUM, MIXER_ELEM_CAPTURE_ENUM,
   MIXER_ELEM_END
 };
 
@@ -702,7 +702,7 @@ mixer_write_cbar (int elem_index)
 
   /* enum list
    */
-  if (type == MIXER_ELEM_ENUM) {
+  if (type == MIXER_ELEM_ENUM || type == MIXER_ELEM_CAPTURE_ENUM) {
     if (mixer_volume_delta[MIXER_CHN_LEFT])
       update_enum_list(elem, MIXER_CHN_LEFT, mixer_volume_delta[MIXER_CHN_LEFT]);
     if (mixer_volume_delta[MIXER_CHN_RIGHT])
@@ -983,7 +983,7 @@ mixer_update_cbar (int elem_index)
        snd_mixer_selem_get_playback_switch(elem, chn_right, &swr);
       extra_info = !swl && !swr ? " [Off]" : "";
     }
-    if (type == MIXER_ELEM_ENUM) {
+    if (type == MIXER_ELEM_ENUM || type == MIXER_ELEM_CAPTURE_ENUM) {
       /* FIXME: should show the item names of secondary and later channels... */
       unsigned int eidx, length;
       tmp[0]=' ';
@@ -1049,7 +1049,7 @@ mixer_update_cbar (int elem_index)
   y--;
   
   /* enum list? */
-  if (type == MIXER_ELEM_ENUM) {
+  if (type == MIXER_ELEM_ENUM || type == MIXER_ELEM_CAPTURE_ENUM) {
     display_enum_list(elem, y, x);
     return; /* no more to display */
   } 
@@ -1752,7 +1752,7 @@ __again:
     if (elem == NULL)
       CHECK_ABORT (ERR_FCN, "snd_mixer_find_selem()", -EINVAL);
     if ( (mixer_view == VIEW_PLAYBACK) || (mixer_view == VIEW_CHANNELS) ) {
-      for (i = 0; i < MIXER_ELEM_CAPTURE; i++) {
+      for (i = MIXER_ELEM_FRONT; i <= MIXER_ELEM_WOOFER; i++) {
         int ok;
         for (j = ok = 0; j < 2; j++) {
          if (mixer_changed_state)
@@ -1764,6 +1764,9 @@ __again:
          sid = (snd_mixer_selem_id_t *)(((char *)mixer_sid) + snd_mixer_selem_id_sizeof() * idx);
          mixer_grpidx[elem_index] = idx;
          if (snd_mixer_selem_is_enumerated(elem)) {
+           if (mixer_view == VIEW_PLAYBACK &&
+               snd_mixer_selem_is_enum_capture(elem))
+             continue;
            mixer_type[elem_index] = MIXER_ELEM_ENUM;
          } else {
            mixer_type[elem_index] = i;
@@ -1795,15 +1798,23 @@ __again:
          (nelems_added == 0 && snd_mixer_selem_has_capture_switch(elem)) &&
          (mixer_view == VIEW_CAPTURE || !snd_mixer_selem_has_common_switch(elem)))
        do_add = 1;
+      if (!do_add &&
+         mixer_view == VIEW_CAPTURE && snd_mixer_selem_is_enum_capture(elem))
+       do_add = 1;
+
       if (do_add) {
         mixer_grpidx[elem_index] = idx;
-        mixer_type[elem_index] = MIXER_ELEM_CAPTURE;
-        if (nelems_added == 0 && snd_mixer_selem_has_capture_switch(elem))
-         mixer_type[elem_index] |= MIXER_ELEM_CAPTURE_SWITCH;
-        if (nelems_added)
-         mixer_type[elem_index] |= MIXER_ELEM_CAPTURE_SUFFIX;
-        if (snd_mixer_selem_has_capture_volume(elem))
-         mixer_type[elem_index] |= MIXER_ELEM_HAS_VOLUME;
+       if (snd_mixer_selem_is_enum_capture(elem))
+         mixer_type[elem_index] = MIXER_ELEM_CAPTURE_ENUM;
+       else {
+         mixer_type[elem_index] = MIXER_ELEM_CAPTURE;
+         if (nelems_added == 0 && snd_mixer_selem_has_capture_switch(elem))
+           mixer_type[elem_index] |= MIXER_ELEM_CAPTURE_SWITCH;
+         if (nelems_added)
+           mixer_type[elem_index] |= MIXER_ELEM_CAPTURE_SUFFIX;
+         if (snd_mixer_selem_has_capture_volume(elem))
+           mixer_type[elem_index] |= MIXER_ELEM_HAS_VOLUME;
+       }
         elem_index++;
         if (elem_index >= mixer_n_elems)
          break;

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages