pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Audio player for .m4a files?
paul%whooppee.com@localhost (Paul Goyette) writes:
>However, neither xterm(1) (when displaying ^G) nor xbiff(1) (when new
>mail arrives) makes any sound. Both of these worked when I was using
>an add-on uaudio0/audio0.
Something like xterm or xbiff talks to the XServer. The wscons
support will then call a WSKBDIO_BELL ioctl that is implemented
by the wsbell driver.
wsbell isn't builtin by default, but can be loaded as a module.
It then attaches to the keyboard multiplexer (wsmux1).
When the kernel loads (without wsbell driver):
[ 1.048093] spkr0 at pcppi0: PC Speaker
[ 1.048093] wsbell at spkr0 not configured
[ 1.048093] spkr1 at audio0: PC Speaker (synthesized)
[ 1.048093] wsbell at spkr1 not configured
[ 1.048093] spkr2 at audio1: PC Speaker (synthesized)
[ 1.048093] wsbell at spkr2 not configured
and then when wsbell is loaded:
[ 4.626205] wsbell0 at spkr0 mux 1
[ 4.626205] wsbell1 at spkr1 mux 1
[ 4.627203] wsbell2 at spkr2 mux 1
# wsmuxctl -f /dev/wsmux1 -L
wskbd0
wsbell0
wsbell1
wsbell2
If I understand the code correctly, the ioctl iterates over these
children until one succeeds, which usually means, the first wsbell
is used.
You can use the wsmuxctl command to remove and add wsbell devices
to effectively control what device is used. In my case, that's
all the same, even the pcppi0 speaker is done by the audio hardware
and while audio1 (the HDMI output) is also routed to the speaker
if no HDMI monitor is connected and the output is heavily distorted
(no idea why), there isn't much of a difference for the bell 'sound'.
But if e.g. I plug in a USB headphone:
[ 2145.738896] audio2 at uaudio0: playback, capture, full duplex, independent
[ 2145.741897] spkr3 at audio2: PC Speaker (synthesized)
[ 2145.742898] wsbell3 at spkr3 mux 1
and use wsmuxctl to drop everything but wsbell3:
# wsmuxctl -f /dev/wsmux1 -r wsbell0
# wsmuxctl -f /dev/wsmux1 -r wsbell1
# wsmuxctl -f /dev/wsmux1 -r wsbell2
# wsmuxctl -f /dev/wsmux1 -L
wskbd0
wsbell3
then I get the beep on the headphone.
Home |
Main Index |
Thread Index |
Old Index