Raspberry Pi audio output
Milan Obuch
freebsd-arm at dino.sk
Sat Mar 7 18:58:17 UTC 2015
On Fri, 6 Mar 2015 13:18:29 -0800
Oleksandr Tymoshenko <gonzo at bluezbox.com> wrote:
>
> > On Mar 6, 2015, at 12:49 AM, Milan Obuch <freebsd-arm at dino.sk>
> > wrote:
> >
> > Hello,
> >
> > there is pcm0 device on Raspberry Pi, sysctl dev.pcm shows
> >
> > dev.pcm.%parent:
> > dev.pcm.0.%desc: VCHQI audio
> > dev.pcm.0.%driver: pcm
> > dev.pcm.0.%location:
> > dev.pcm.0.%pnpinfo:
> > dev.pcm.0.%parent: vchiq0
> > dev.pcm.0.play.vchans: 1
> > dev.pcm.0.play.vchanmode: fixed
> > dev.pcm.0.play.vchanrate: 48000
> > dev.pcm.0.play.vchanformat: s16le:2.0
> > dev.pcm.0.buffersize: 0
> > dev.pcm.0.bitperfect: 0
> > dev.pcm.0.dest: 0
> >
> > In /dev directory, there are just midistat and sndstat devices,
> > cat /dev/sndstat shows
> >
> > Installed devices:
> > pcm0: <VCHQI audio> (play) default
> >
> > How can I use this device? I would like to check it and possibly
> > use... Also, is it connected to 3.5 mm jack or do we have sound
> > through HDMI?
>
> It’s standard OSS interface, you can either access /dev/dsp0 directly
> or use one of audio library (e.g. libao). To test it just install
> mpg321 and try to play some mp3s.
>
> Audio output is connected to both HDMI and 3.5mm jack and controlled
> by dev.pcm.0.dest sysctl. Available values are:
>
> 0 - auto. VideoCore decides where to direct audio output based on
> current HDMI mode.
> 1 - headphones, audio goes to 3.5mm jack
> 2 - HDMI. Audio goes to HDMI display. Please note that not every HDMI
> mode supports audio.
Thank you, yes, it works. I build audio/mp3blaster port, and tested it
a bit. Also switching from HDMI to headphones works.
Regards,
Milan
More information about the freebsd-arm
mailing list