Date: Mon, 17 Oct 2022 19:26:43 +0100 From: Marco Devesas Campos <devesas.campos@gmail.com> To: Odhiambo Washington <odhiambo@gmail.com> Cc: Hans Petter Selasky <hps@selasky.org>, Warner Losh <imp@bsdimp.com>, freebsd-arm@freebsd.org, Ronald Klop <ronald-lists@klop.ws> Subject: Re: sound on raspberry pi 4 Message-ID: <94364306-B7EF-4B1A-866E-C2E566047DFE@gmail.com> In-Reply-To: <CAAdA2WMZnb86_JicibXcXqNbktT1y_A2FZSmi_W2YwcccWd0CA@mail.gmail.com> References: <Yw%2Bf4FlUSBRiG7Fm@void.f-m.fm> <fd10cb99-d703-6b67-85c5-ed0d2df58952@klop.ws> <1e9994f4-39f9-5adf-2cb7-03c9981b424e@selasky.org> <e4db8912-8b91-e9b7-74fd-518dc0f0ec75@klop.ws> <fb725e00-213c-fd93-c275-31f31ba53e5e@klop.ws> <9C8C18F4-43BA-4F1E-B683-7BD5AC513C8C@gmail.com> <948CD3ED-F501-431F-BE66-3DD51A8C9EF5@gmail.com> <D004B365-569D-4776-A7A0-BF00E559BD82@gmail.com> <CAAdA2WMZnb86_JicibXcXqNbktT1y_A2FZSmi_W2YwcccWd0CA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi Odhiambo, and List, > On 17 Oct 2022, at 13:50, Odhiambo Washington <odhiambo@gmail.com> = wrote: >=20 >=20 > Just curious. How do I test this? > I have a Pi3B+ which I have always wanted to run FreeBSD on, but then = getting FreeBSD Desktop is so much pain. > How would I test accel video and sound on a Pi without getting = stressed out? :-) >=20 Oooh boy, I don=E2=80=99t know about that not getting stressed out=E2=80=A6= Anyway, the short answer to how you test this is: by using the 32bit = compat mode.=20 (People with pi4s please read to the end). 64 bit pis can run 32 bit code, and (to simplify) the libraries that = connect (via the driver) to the hardware have not been updated to 64 bits.=20 If that hasn=E2=80=99t put you off, this is what i did to play video: - build the kernel with vchiq support (the patch) - I had an SD card with a 32 bit installation that had the rpi-userland, = rpi-firmware and omxplayer packages. I hooked it up to the pi with a usb = card reader and then used chroot to go into the =E2=80=9C32bit world=E2=80=9D # sudo chroot <mount point> /bin/sh - We need to mount devfs first inside our impromptu jail # mount -t devfs devfs /dev - and=E2=80=A6 that=E2=80=99s it, we=E2=80=99re ready to play some video # file `which omxplayer.bin` /usr/local/bin/omxplayer.bin: ELF 32-bit LSB executable, ARM, EABI5 = version 1 (FreeBSD), dynamically linked, interpreter = /libexec/ld-elf.so.1, FreeBSD-style, for FreeBSD 13.0 (1300139), = stripped # omxplayer.bin /home/freebsd/f.mp4 Video codec omx-h264 width 464 height 272 profile 578 fps 25.000000 Audio codec aac channels 2 samplerate 48000 bitspersample 16 Subtitle count: 0, state: off, index: 1, delay: 0 V:PortSettingsChanged: 464x272@25.00 interlace:0 deinterlace:0 = anaglyph:0 par:nan display:0 layer:0 alpha:255 aspectMode:0 Stopped at: 00:00:08 have a nice day ;) I don=E2=80=99t think I=E2=80=99ve ever tried it but it should be doable = to just download an existing arm (v7?) image, mount it as a memory disk, and use that as a root system on = which to install the needed packages. =20 The bad news: Pi4=E2=80=99s don=E2=80=99t have the 3d/2d acceleration = drivers, so that=E2=80=99s out. Unfortunately even omxplayer from ports is out since it uses openvg, the 2d = acceleration framework, for rendering subtitles =E2=80=94 and will crash on start even without them. = However, If people get in touch I can help them compile it on freebsd without subtitle support. OpenGL applications work (again, on pi3/zero2) provided they worked on = 32 bits. Unfortunately, iirc, lots of ports required mesa-libs which conflicted = with the userland (accelerated) drivers so there aren=E2=80=99t many examples around. Have = only tested the example from https://github.com/raspberrypi/firmware Any doubts/problems do get in touch, Marco
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?94364306-B7EF-4B1A-866E-C2E566047DFE>