[MPlayer-dev-eng] [PATCH] mute audio on NetBSD with sun audio output driver

Bernd Ernesti mplayer-dev-eng at lists.veego.de
Fri Dec 23 06:52:35 CET 2005


On Thu, Dec 22, 2005 at 05:30:02PM +0100, Alexander Becher wrote:
> Bernd Ernesti schrieb:
> >On Thu, Dec 22, 2005 at 01:50:01AM +0100, Alexander Becher wrote:
> >> Since revision 1.19 of the file libao2/ao_sun.c, muting is as follows:
> >> mixer volume is not changed, only a mute flag is set, which does not
> >> exist on NetBSD (nor on OpenBSD to my knowledge). Therefore, muting has
> >> no effect. With the attached patch, when the volume levels are
> >> requested to be set to zero, they are changed in addition to the mute
> >> flag being set.
> >
> >Hmm, that is partly true, you can't set that flag via audio_info, but
> >you should be able to use mixer_ctrl_t to mute it via outputs.master.mute=on.
> >
> >man 4 audio.
> 
> That's true, but:
> 
> 1) the code would probably not be as simple and

It shouldn't be so complicated. Just one ioctl with the right parameter.
Oh, and using a new device: /dev/mixer instead of /dev/audio

> 2) I'm not sure if outputs.master.mute exists in all audio drivers.

That maybe be harder, but greping for AudioNmute reviels at lot for
drivers who uses it, at least all ac97 drivers.
But I think it should be possible to make a test for the property
before using it.

> If the answer to (2) is yes, using the mixer interface is probably
> indeed preferable.

I'm not an expert with this kernel interface, so I'm going to ask some
people about it.

Bernd




More information about the MPlayer-dev-eng mailing list