Index: libao2/ao_alsa.c =================================================================== RCS file: /cvsroot/mplayer/main/libao2/ao_alsa.c,v retrieving revision 1.2 diff -u -r1.2 ao_alsa.c --- libao2/ao_alsa.c 11 Jun 2004 15:20:49 -0000 1.2 +++ libao2/ao_alsa.c 26 Jun 2004 22:26:26 -0000 @@ -100,27 +100,15 @@ snd_mixer_elem_t *elem; snd_mixer_selem_id_t *sid; - static char *mix_name = NULL; - static char *card = NULL; + static char *mix_name = "PCM"; + static char *card = "default"; long pmin, pmax; long get_vol, set_vol; float calc_vol, diff, f_multi; - if(mix_name == NULL){ - if(mixer_device) { - card = strdup(mixer_device); - mix_name = strchr(card, '/'); - if(mix_name) { - *mix_name++ = 0; - } else { - mix_name = "PCM"; - } - } else { - mix_name = "PCM"; - card = "default"; - } - } + if(mixer_channel) mix_name = mixer_channel; + if(mixer_device) card = mixer_device; if(ao_data.format == AFMT_AC3) return CONTROL_TRUE; Index: libao2/ao_alsa1x.c =================================================================== RCS file: /cvsroot/mplayer/main/libao2/ao_alsa1x.c,v retrieving revision 1.44 diff -u -r1.44 ao_alsa1x.c --- libao2/ao_alsa1x.c 6 Apr 2004 17:55:36 -0000 1.44 +++ libao2/ao_alsa1x.c 26 Jun 2004 22:26:30 -0000 @@ -101,27 +101,15 @@ snd_mixer_elem_t *elem; snd_mixer_selem_id_t *sid; - static char *mix_name = NULL; - static char *card = NULL; + static char *mix_name = "PCM"; + static char *card = "default"; long pmin, pmax; long get_vol, set_vol; float calc_vol, diff, f_multi; - if(mix_name == NULL){ - if(mixer_device) { - card = strdup(mixer_device); - mix_name = strchr(card, '/'); - if(mix_name) { - *mix_name++ = 0; - } else { - mix_name = "PCM"; - } - } else { - mix_name = "PCM"; - card = "default"; - } - } + if(mixer_channel) mix_name = mixer_channel; + if(mixer_device) card = mixer_device; if(ao_data.format == AFMT_AC3) return CONTROL_TRUE; Index: libao2/ao_alsa9.c =================================================================== RCS file: /cvsroot/mplayer/main/libao2/ao_alsa9.c,v retrieving revision 1.46 diff -u -r1.46 ao_alsa9.c --- libao2/ao_alsa9.c 6 Apr 2004 17:55:36 -0000 1.46 +++ libao2/ao_alsa9.c 26 Jun 2004 22:26:34 -0000 @@ -91,27 +91,15 @@ snd_mixer_elem_t *elem; snd_mixer_selem_id_t *sid; - static char *mix_name = NULL; - static char *card = NULL; + static char *mix_name = "PCM"; + static char *card = "default"; long pmin, pmax; long get_vol, set_vol; float calc_vol, diff, f_multi; - if(mix_name == NULL){ - if(mixer_device) { - card = strdup(mixer_device); - mix_name = strchr(card, '/'); - if(mix_name) { - *mix_name++ = 0; - } else { - mix_name = "PCM"; - } - } else { - mix_name = "PCM"; - card = "default"; - } - } + if(mixer_channel) mix_name = mixer_channel; + if(mixer_device) card = mixer_device; if(ao_data.format == AFMT_AC3) return CONTROL_TRUE; Index: DOCS/man/en/mplayer.1 =================================================================== RCS file: /cvsroot/mplayer/main/DOCS/man/en/mplayer.1,v retrieving revision 1.609 diff -u -r1.609 mplayer.1 --- DOCS/man/en/mplayer.1 26 Jun 2004 16:21:22 -0000 1.609 +++ DOCS/man/en/mplayer.1 26 Jun 2004 22:26:58 -0000 @@ -1533,14 +1533,17 @@ .B \-mixer This option will tell MPlayer to use a different device for mixing than /dev/\:mixer. +For ALSA this is the mixer name. .TP -.B \-mixer-channel (\-ao oss only) +.B \-mixer-channel (\-ao oss and \-ao alsa only) This option will tell MPlayer to use a different channel for controlling volume than the default PCM. -Options include +Options for OSS include .B vol, pcm, line. For a complete list of options look for SOUND_DEVICE_NAMES in /usr/include/linux/soundcard.h. +For ALSA you can use the names e.g. alsamixer displays, like +.B Master, Line, PCM. .TP .B \-nowaveheader (\-ao pcm only) Don't include wave header.