From 713306041324f18fd546fbf99cd7d15ec1eeb6f2 Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Tue, 22 Oct 2013 14:32:56 +0300 Subject: Sound support for Raspberry Pi MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Load appropriate kernel module and setup correct alsa configuration. Sound is routed to HDMI by default, so include amixer util that can be used to switch to analog output: amixer cset numid=3 1 Change-Id: I1a975992a45ea2a11ce44ded8b1649488e676341 Reviewed-by: Pasi Petäjäjärvi --- conf/distro/include/raspberrypi.conf | 2 ++ recipes/alsa/alsa-state.bbappend | 1 + recipes/alsa/alsa-state/raspberrypi/asound.conf | 9 +++++++++ recipes/images/b2qt-embedded-image.bb | 1 + 4 files changed, 13 insertions(+) create mode 100644 recipes/alsa/alsa-state.bbappend create mode 100644 recipes/alsa/alsa-state/raspberrypi/asound.conf diff --git a/conf/distro/include/raspberrypi.conf b/conf/distro/include/raspberrypi.conf index 371befe..e7e12c3 100644 --- a/conf/distro/include/raspberrypi.conf +++ b/conf/distro/include/raspberrypi.conf @@ -10,3 +10,5 @@ MACHINE_EXTRA_INSTALL = "\ MACHINE_EXTRA_INSTALL_SDK = " \ userland-dev \ " + +module_autoload_snd-bcm2835 = "snd-bcm2835" diff --git a/recipes/alsa/alsa-state.bbappend b/recipes/alsa/alsa-state.bbappend new file mode 100644 index 0000000..72d991c --- /dev/null +++ b/recipes/alsa/alsa-state.bbappend @@ -0,0 +1 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" diff --git a/recipes/alsa/alsa-state/raspberrypi/asound.conf b/recipes/alsa/alsa-state/raspberrypi/asound.conf new file mode 100644 index 0000000..83f7f9a --- /dev/null +++ b/recipes/alsa/alsa-state/raspberrypi/asound.conf @@ -0,0 +1,9 @@ +pcm.!default { + type hw + card 0 +} + +ctl.!default { + type hw + card 0 +} diff --git a/recipes/images/b2qt-embedded-image.bb b/recipes/images/b2qt-embedded-image.bb index 6dc4f1f..feb1cfd 100644 --- a/recipes/images/b2qt-embedded-image.bb +++ b/recipes/images/b2qt-embedded-image.bb @@ -52,6 +52,7 @@ IMAGE_INSTALL += "\ liberation-fonts \ tslib \ tslib-calibrate \ + alsa-utils-amixer \ ${GSTREAMER_EXTRA_INSTALL} \ ${TOOLS_EXTRA_INSTALL} \ ${MACHINE_EXTRA_INSTALL} \ -- cgit v1.2.3-54-g00ecf