diff --git a/meta-digi-dey/recipes-multimedia/pulseaudio/pulseaudio/dey-audio-hdmi.conf b/meta-digi-dey/recipes-multimedia/pulseaudio/pulseaudio/dey-audio-hdmi.conf new file mode 100644 index 000000000..6ae671021 --- /dev/null +++ b/meta-digi-dey/recipes-multimedia/pulseaudio/pulseaudio/dey-audio-hdmi.conf @@ -0,0 +1,35 @@ +# This file is part of PulseAudio. +# +# PulseAudio is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation; either version 2.1 of the +# License, or (at your option) any later version. +# +# PulseAudio is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with PulseAudio; if not, see . + +; Audio profile for Digi ConnectCore 6 HDMI sound card +; +; Copyright (C) 2017 by Digi International Inc. +; +; This device has only one output (analog stereo) +; +; See default.conf for an explanation on the directives used here. + +[General] +auto-profiles = no + +[Mapping analog-stereo] +description = Analog Stereo +device-strings = hw:%f +channel-map = left,right +direction = output + +[Profile output:analog-stereo] +description = Analog Stereo Output +output-mappings = analog-stereo diff --git a/meta-digi-dey/recipes-multimedia/pulseaudio/pulseaudio/dey-audio-sgtl5000.conf b/meta-digi-dey/recipes-multimedia/pulseaudio/pulseaudio/dey-audio-sgtl5000.conf new file mode 100644 index 000000000..7c219776e --- /dev/null +++ b/meta-digi-dey/recipes-multimedia/pulseaudio/pulseaudio/dey-audio-sgtl5000.conf @@ -0,0 +1,69 @@ +# This file is part of PulseAudio. +# +# PulseAudio is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation; either version 2.1 of the +# License, or (at your option) any later version. +# +# PulseAudio is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with PulseAudio; if not, see . + +; Audio profile for Digi ConnectCore 6 SBC SGTL5000 sound card +; +; Copyright (C) 2017 by Digi International Inc. +; +; This device can operate in either mono or stereo for output, input or duplex +; +; Profile probing is skipped to save time during loading +; +; See default.conf for an explanation on the directives used here. + +[General] +auto-profiles = no + +[Mapping analog-mono] +description = Analog Mono +device-strings = hw:%f +channel-map = mono + +[Mapping analog-stereo] +description = Analog Stereo +device-strings = hw:%f +channel-map = left,right + +[Profile input:analog-mono] +description = Analog Mono Input +input-mappings = analog-mono +skip-probe = yes + +[Profile input:analog-stereo] +description = Analog Stereo Input +input-mappings = analog-stereo +skip-probe = yes + +[Profile output:analog-mono] +description = Analog Mono Output +output-mappings = analog-mono +skip-probe = yes + +[Profile output:analog-mono+input:analog-mono] +description = Analog Mono Duplex +output-mappings = analog-mono +input-mappings = analog-mono +skip-probe = yes + +[Profile output:analog-stereo] +description = Analog Stereo Output +output-mappings = analog-stereo +skip-probe = yes + +[Profile output:analog-stereo+input:analog-stereo] +description = Analog Stereo Duplex +output-mappings = analog-stereo +input-mappings = analog-stereo +skip-probe = yes diff --git a/meta-digi-dey/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend b/meta-digi-dey/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend index cdbab483f..2f322db06 100644 --- a/meta-digi-dey/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend +++ b/meta-digi-dey/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend @@ -3,14 +3,27 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" SRC_URI_append_ccimx6ulsbc = " file://0001-pulseaudio-keep-headphones-volume-in-platforms-witho.patch" -SRC_URI_append_ccimx6sbc = " file://hdmi_hotplug.sh" +SRC_URI_append_ccimx6sbc = " \ + file://hdmi_hotplug.sh \ + file://dey-audio-hdmi.conf \ + file://dey-audio-sgtl5000.conf \ +" do_install_append_ccimx6sbc() { install -d ${D}${sysconfdir}/udev/scripts install -m 0755 ${WORKDIR}/hdmi_hotplug.sh ${D}${sysconfdir}/udev/scripts + install -d ${D}${datadir}/pulseaudio/alsa-mixer/profile-sets + install -m 0644 ${WORKDIR}/dey-audio-hdmi.conf ${D}${datadir}/pulseaudio/alsa-mixer/profile-sets + install -m 0644 ${WORKDIR}/dey-audio-sgtl5000.conf ${D}${datadir}/pulseaudio/alsa-mixer/profile-sets + cat >> ${D}${base_libdir}/udev/rules.d/90-pulseaudio.rules <<-_EOL_ + # Digi ConnectCore 6 SBC HDMI + ATTRS{id}=="imxhdmisoc", ENV{PULSE_PROFILE_SET}="dey-audio-hdmi.conf" + # Digi ConnectCore 6 SBC SGTL5000 + ATTRS{id}=="sgtl5000audio", ENV{PULSE_PROFILE_SET}="dey-audio-sgtl5000.conf" + SUBSYSTEM=="platform", KERNEL=="*hdmi_video", ACTION=="change", RUN+="/etc/udev/scripts/hdmi_hotplug.sh" _EOL_ }