aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Bachmann <mbc@iot.bzh>2015-11-12 13:00:50 +0000
committerManuel Bachmann <mbc@iot.bzh>2015-11-13 07:31:58 +0000
commitb5134746d323326a270a22e60112f21043ec6f7f (patch)
tree4d1acb5c4b025aaf5636f5921e09db36cdbc3b16
parent137657697ec82d388c1ac4459c50b2da9e9ee59e (diff)
r-car m2: preconfigure Porter/Koelsch sound mixer
Sound is inaudible when starting a Porter/Koelsch board, because default state of their sound mixer is muted. Add a "alsa-utils-config" recipe which will be commented out, but available in local.conf, to preconfigure their mixer. Sound volume will be approximately 25% of maximum. Change-Id: Iaf60f612f8e01e7aa51f8a0558de00f26d36aee8 Signed-off-by: Manuel Bachmann <mbc@iot.bzh>
-rw-r--r--meta-rcar-gen2/conf/local.conf.sample2
-rw-r--r--meta-rcar-gen2/recipes-graphics/images/core-image-renesas-base.inc2
-rw-r--r--meta-rcar-gen2/recipes-multimedia/alsa/alsa-utils-config.bb27
-rw-r--r--meta-rcar-gen2/recipes-multimedia/alsa/alsa-utils-config/COPYING39
-rw-r--r--meta-rcar-gen2/recipes-multimedia/alsa/alsa-utils-config/asound.state-porter106
5 files changed, 174 insertions, 2 deletions
diff --git a/meta-rcar-gen2/conf/local.conf.sample b/meta-rcar-gen2/conf/local.conf.sample
index 9ff33b2..85fefa0 100644
--- a/meta-rcar-gen2/conf/local.conf.sample
+++ b/meta-rcar-gen2/conf/local.conf.sample
@@ -48,7 +48,7 @@ PACKAGECONFIG_remove_pn-qtquick1 = "webkit"
#IMAGE_INSTALL_append_porter = " \
# packagegroup-rcar-gen2-multimedia \
# packagegroup-lcb-oss-codecs \
-# alsa-utils alsa-tools \
+# alsa-utils alsa-utils-config alsa-tools \
#"
# For Bluetooth hardware support
diff --git a/meta-rcar-gen2/recipes-graphics/images/core-image-renesas-base.inc b/meta-rcar-gen2/recipes-graphics/images/core-image-renesas-base.inc
index 4f99a90..169c5f6 100644
--- a/meta-rcar-gen2/recipes-graphics/images/core-image-renesas-base.inc
+++ b/meta-rcar-gen2/recipes-graphics/images/core-image-renesas-base.inc
@@ -2,7 +2,7 @@ require ../../include/multimedia-control.inc
require ../../include/gles-control.inc
# common
IMAGE_INSTALL_append_rcar-gen2 = " \
- alsa-utils alsa-tools \
+ alsa-utils alsa-utils-config alsa-tools \
libdrm-tests \
libdrm-kms \
bash \
diff --git a/meta-rcar-gen2/recipes-multimedia/alsa/alsa-utils-config.bb b/meta-rcar-gen2/recipes-multimedia/alsa/alsa-utils-config.bb
new file mode 100644
index 0000000..c7ecfea
--- /dev/null
+++ b/meta-rcar-gen2/recipes-multimedia/alsa/alsa-utils-config.bb
@@ -0,0 +1,27 @@
+SUMMARY = "ALSA sound configuration"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=3d5968ae2c5badd70c24075cfe58cc1e"
+
+RDEPENDS_${PN} = "alsa-utils"
+
+COMPATIBLE_MACHINE = "(porter|koelsch)"
+
+FILESEXTRAPATHS_prepend := ":${THISDIR}/alsa-utils-config:"
+
+SRC_URI = "file://COPYING \
+ "
+SRC_URI_append_porter = "file://asound.state-porter"
+SRC_URI_append_koelsch = "file://asound.state-porter"
+# SRC_URI_append_silk = "file://asound.state-silk"
+
+do_configure() {
+ cp ${WORKDIR}/COPYING ${S}
+ cp ${WORKDIR}/asound.state* ${S}/asound.state
+}
+
+do_install() {
+ install -d ${D}/${localstatedir}/lib/alsa
+ install -m 0644 asound.state ${D}/${localstatedir}/lib/alsa
+}
+
+FILES_${PN} += "${localstatedir}"
diff --git a/meta-rcar-gen2/recipes-multimedia/alsa/alsa-utils-config/COPYING b/meta-rcar-gen2/recipes-multimedia/alsa/alsa-utils-config/COPYING
new file mode 100644
index 0000000..c7f9365
--- /dev/null
+++ b/meta-rcar-gen2/recipes-multimedia/alsa/alsa-utils-config/COPYING
@@ -0,0 +1,39 @@
+Copyright © 2015-2016 IoT.bzh
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that copyright
+notice and this permission notice appear in supporting documentation, and
+that the name of the copyright holders not be used in advertising or
+publicity pertaining to distribution of the software without specific,
+written prior permission. The copyright holders make no representations
+about the suitability of this software for any purpose. It is provided "as
+is" without express or implied warranty.
+
+THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+OF THIS SOFTWARE.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the "Software"),
+to deal in the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice (including the next
+paragraph) shall be included in all copies or substantial portions of the
+Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
diff --git a/meta-rcar-gen2/recipes-multimedia/alsa/alsa-utils-config/asound.state-porter b/meta-rcar-gen2/recipes-multimedia/alsa/alsa-utils-config/asound.state-porter
new file mode 100644
index 0000000..ef6fd33
--- /dev/null
+++ b/meta-rcar-gen2/recipes-multimedia/alsa/alsa-utils-config/asound.state-porter
@@ -0,0 +1,106 @@
+state.rsnddai0ak4642h {
+ control.1 {
+ iface MIXER
+ name 'Digital Playback Volume'
+ value.0 182
+ value.1 182
+ comment {
+ access 'read write'
+ type INTEGER
+ count 2
+ range '0 - 255'
+ dbmin -9999999
+ dbmax 1200
+ dbvalue.0 -2450
+ dbvalue.1 -2450
+ }
+ }
+ control.2 {
+ iface MIXER
+ name 'LINEOUT Mixer DACL'
+ value true
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.3 {
+ iface MIXER
+ name 'Headphone Enable Switch'
+ value true
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.4 {
+ iface MIXER
+ name 'Playback ReConvert Rate'
+ value 48004
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 192000 (step 1)'
+ }
+ }
+ control.5 {
+ iface MIXER
+ name 'DVC Out Playback Volume'
+ value.0 25
+ value.1 25
+ comment {
+ access 'read write'
+ type INTEGER
+ count 2
+ range '0 - 100'
+ }
+ }
+ control.6 {
+ iface MIXER
+ name 'DVC Out Mute Switch'
+ value.0 false
+ value.1 false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 2
+ }
+ }
+ control.7 {
+ iface MIXER
+ name 'Capture ReConvert Rate'
+ value 0
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 192000 (step 1)'
+ }
+ }
+ control.8 {
+ iface MIXER
+ name 'DVC In Capture Volume'
+ value.0 0
+ value.1 0
+ comment {
+ access 'read write'
+ type INTEGER
+ count 2
+ range '0 - 100'
+ }
+ }
+ control.9 {
+ iface MIXER
+ name 'DVC In Mute Switch'
+ value.0 false
+ value.1 false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 2
+ }
+ }
+}