From nobody Mon Oct 17 18:26:43 2022 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Mrlnj55mDz4f6tJ for ; Mon, 17 Oct 2022 18:26:49 +0000 (UTC) (envelope-from devesas.campos@gmail.com) Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Mrlnh17T7z3ppG for ; Mon, 17 Oct 2022 18:26:48 +0000 (UTC) (envelope-from devesas.campos@gmail.com) Received: by mail-wm1-x32d.google.com with SMTP id e18so9212064wmq.3 for ; Mon, 17 Oct 2022 11:26:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=gXyCbfUwW05+QoppEOW7y7XDb7CtUddLcAS6PXt0bUc=; b=H6FGh50IxQ1LX+q9qgx8eR88AG7/fMjqVWcm+8rJHwena4o84Xvu/7NzL93NRZGveO ChofZuGeobrClD63pY8wTOKFGeCJY1W81A8vFOqNvhluWENaDKUEinS2/j/9728847pg IIQGtrOkVu5+sIr3uQKZXsFQzFI7/QdqvHxJNOUmD/yzwM4zl/LNeTv2YtztE7w2poRU 8opuwXILrny3P5eAk3AgAHBU9mfZPSE2rax8h2cKUuCXxN7Ksbb8EIAI8D+xESyDQh3x pfhvBvwktZzTZh3qPVdvV4XE6m5HrXOUFgDZq3nlOcvvGi6XPfdormrzKgg0isXrDoJJ GRNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gXyCbfUwW05+QoppEOW7y7XDb7CtUddLcAS6PXt0bUc=; b=B4tko2rtireBnsbLGN7FHNn4htaPLpreGpOgJ5sOEIg/79GWlnORg52nI8WWBUFA4r GX9HPDuEHLLHUyS4lm+QFV8r/qMXjaV/ZMVMjIGVSsQq/rg9pxO9Xn8LlMw9i9hstyKJ f4s31HKF/qUwsaEvzf4EoOBfvRGpNi+OTjURqBtS+g5eufLSnseFncrYuNLjafnoFTkp ATng2J/91lm9ovO8GGLuuFrXESAEZB8zgDNH/w55A5nmsoPDVzKrqJrXFPUq3FqfBTv/ GRoZ6jzqI+njbkh7eqD4MUDt1UiTUdbvOdD6wmyMw9HlEesZ6VST2fEHQlRc9Z0F2j9w 4Sjg== X-Gm-Message-State: ACrzQf1viNwLz7A/AGXq0MPbzUa7F/4bF2jEhj0OY8XUl4KDl7DMp4EY fiRmS1xbvVxYHlXAJFHUPyY= X-Google-Smtp-Source: AMsMyM59hAWOI0dIGPmrEYSa3/poGy61j4pJ2G7Zx3bWS29Sf5vM7i4fYXHaDmAqF231MsEGWEbxGQ== X-Received: by 2002:a7b:cb92:0:b0:3c4:cf60:7a7 with SMTP id m18-20020a7bcb92000000b003c4cf6007a7mr8419481wmi.24.1666031206679; Mon, 17 Oct 2022 11:26:46 -0700 (PDT) Received: from smtpclient.apple (a213-22-242-181.cpe.netcabo.pt. [213.22.242.181]) by smtp.gmail.com with ESMTPSA id l1-20020a5d4bc1000000b0022afe4fb459sm4207334wrt.51.2022.10.17.11.26.45 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Oct 2022 11:26:45 -0700 (PDT) Content-Type: text/plain; charset=utf-8 List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: Re: sound on raspberry pi 4 From: Marco Devesas Campos In-Reply-To: Date: Mon, 17 Oct 2022 19:26:43 +0100 Cc: Hans Petter Selasky , Warner Losh , freebsd-arm@freebsd.org, Ronald Klop Content-Transfer-Encoding: quoted-printable Message-Id: <94364306-B7EF-4B1A-866E-C2E566047DFE@gmail.com> References: <1e9994f4-39f9-5adf-2cb7-03c9981b424e@selasky.org> <9C8C18F4-43BA-4F1E-B683-7BD5AC513C8C@gmail.com> <948CD3ED-F501-431F-BE66-3DD51A8C9EF5@gmail.com> To: Odhiambo Washington X-Mailer: Apple Mail (2.3654.120.0.1.13) X-Rspamd-Queue-Id: 4Mrlnh17T7z3ppG X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=H6FGh50I; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of devesas.campos@gmail.com designates 2a00:1450:4864:20::32d as permitted sender) smtp.mailfrom=devesas.campos@gmail.com X-Spamd-Result: default: False [-3.44 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.94)[-0.945]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112]; MIME_GOOD(-0.10)[text/plain]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TAGGED_FROM(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::32d:from]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_SOME(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; DKIM_TRACE(0.00)[gmail.com:+]; FROM_EQ_ENVFROM(0.00)[]; FREEMAIL_TO(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org] X-ThisMailContainsUnwantedMimeParts: N Hi Odhiambo, and List, > On 17 Oct 2022, at 13:50, Odhiambo Washington = 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 /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