Comments (2)
Raspberry Pi
snd_bcm2835
kernel module has two modes of operation:
-
without parameters, it will create a single ALSA card (
aplay -l
) with two/three different "devices". You can switch between them usingamixer cset numid=3 x
. -
using parameters:
snd_bcm2835.enable_headphones=1 snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_compat_alsa=0
. It will create two/three different cards.
Considerations
- Mode 2 allows you to have one pulse sink for each output (HDMI0/HDMI1/3.5mm) which is what we want because standarization is good! (
pactl load-module alsa-sink device=hw:CARD=HDMI,DEV=0
) - Mode 2 is not the default module configuration. So enabling it requires either editing
cmdline.txt
ormodprobe
-ing the module on startup. - Mode 1, pulseaudio overrides the default amixer card so
amixer cset numid=3 x
needs to beamixer -c 0 cset numid=3 x
. - Mode 2 removes the need of installing alsa-utils package which can spur confusion.
Neat bash commands to get kernel module parameters:
cat /proc/modules | cut -f 1 -d " " | while read module; do \
echo "Module: $module"; \
if [ -d "/sys/module/$module/parameters" ]; then \
ls /sys/module/$module/parameters/ | while read parameter; do \
echo -n "Parameter: $parameter --> "; \
cat /sys/module/$module/parameters/$parameter; \
done; \
fi; \
echo; \
done
from audio.
Reopening to further evaluate in the future...
from audio.
Related Issues (20)
- rpi4: snd_bcm2835 kernel module not being loaded on newer balenaOS versions HOT 5
- Can't play audio HOT 1
- Entry.sh breaks on Intel NUC ironically because of special handling for Intel NUC HOT 1
- Balena audio-block error: "amixer: Control sysdefault:1 element write error: Operation not permitted"
- Add support for Nano Pi Air HOT 1
- [Feature request] Support 5.1 audio
- Issues with I2S Adafruit Amp
- No audio without "alsactl restore"
- Resize logo.png to match the look of other blocks. HOT 1
- Consider using default sink command HOT 1
- Move library to own repo
- DBus and X11 error HOT 1
- Clarify docs
- Make bridge scripts independant of `install_packages`
- Bump PulseAudio to a more recent version
- PulseAudio doesn't detect USB hot-plugging if no USB device was connected at startup HOT 3
- Expose cookie via volume
- Setting default output and volume not working in 0.5
- Cannot find card '0' HOT 1
- Can't pull images? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from audio.