]> git.alsa-project.org Git - alsa-utils.git/commitdiff
Add -V option
authorTakashi Iwai <tiwai@suse.de>
Mon, 20 Dec 2004 13:17:47 +0000 (13:17 +0000)
committerTakashi Iwai <tiwai@suse.de>
Mon, 20 Dec 2004 13:17:47 +0000 (13:17 +0000)
Add -V option to specify the default view mode.

alsamixer/alsamixer.c

index c23651bb02b14cc6917230852978886619d26338..17adc109dc1b8c2d34fcf275a22dcdb6a68eada6 100644 (file)
@@ -2061,7 +2061,7 @@ main (int    argc,
    */
   do
     {
-      opt = getopt (argc, argv, "c:D:shg");
+      opt = getopt (argc, argv, "c:D:shgV:");
       switch (opt)
        {
        case '?':
@@ -2089,6 +2089,14 @@ main (int    argc,
        case 's':
          mixer_minimize = 1;
          break;
+       case 'V':
+         if (*optarg == 'p' || *optarg == 'P')
+           mixer_view = VIEW_PLAYBACK;
+         else if (*optarg == 'c' || *optarg == 'C')
+           mixer_view = VIEW_CAPTURE;
+         else
+           mixer_view = VIEW_CHANNELS;
+         break;
        }
     }
   while (opt > 0);