From 951f20d36b8575e121a27e5acd7ad68c722a98af Mon Sep 17 00:00:00 2001 From: Hector Palacios Date: Mon, 2 Jan 2017 13:59:54 +0100 Subject: [PATCH] pulseaudio: avoid headphone mute when no jack detection Some platforms, like ccimx6ulsbc, don't support jack detection out of the box. PulseAudio will mute the Headphones by default if it believes there is no headphones jack plugged-in. With this patch we tell it to preserve ALSA default value for the headphones controls. Signed-off-by: Hector Palacios https://jira.digi.com/browse/DEL-3435 --- ...headphones-volume-in-platforms-witho.patch | 41 +++++++++++++++++++ .../pulseaudio/pulseaudio_%.bbappend | 7 ++++ 2 files changed, 48 insertions(+) create mode 100644 meta-digi-dey/recipes-multimedia/pulseaudio/pulseaudio/0001-pulseaudio-keep-headphones-volume-in-platforms-witho.patch create mode 100644 meta-digi-dey/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend diff --git a/meta-digi-dey/recipes-multimedia/pulseaudio/pulseaudio/0001-pulseaudio-keep-headphones-volume-in-platforms-witho.patch b/meta-digi-dey/recipes-multimedia/pulseaudio/pulseaudio/0001-pulseaudio-keep-headphones-volume-in-platforms-witho.patch new file mode 100644 index 000000000..3652af0e4 --- /dev/null +++ b/meta-digi-dey/recipes-multimedia/pulseaudio/pulseaudio/0001-pulseaudio-keep-headphones-volume-in-platforms-witho.patch @@ -0,0 +1,41 @@ +From: Hector Palacios +Date: Mon, 2 Jan 2017 13:11:02 +0100 +Subject: [PATCH] pulseaudio: keep headphones volume in platforms without jack + detection + +Signed-off-by: Hector Palacios +--- + src/modules/alsa/mixer/paths/analog-output-headphones.conf | 4 ++-- + src/modules/alsa/mixer/paths/analog-output-speaker.conf | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/modules/alsa/mixer/paths/analog-output-headphones.conf b/src/modules/alsa/mixer/paths/analog-output-headphones.conf +index b6ee70ba84c5..ddc0918d3a12 100644 +--- a/src/modules/alsa/mixer/paths/analog-output-headphones.conf ++++ b/src/modules/alsa/mixer/paths/analog-output-headphones.conf +@@ -81,8 +81,8 @@ override-map.2 = all-left,all-right + + [Element Headphone] + required-any = any +-switch = mute +-volume = merge ++switch = on ++volume = ignore + override-map.1 = all + override-map.2 = all-left,all-right + +diff --git a/src/modules/alsa/mixer/paths/analog-output-speaker.conf b/src/modules/alsa/mixer/paths/analog-output-speaker.conf +index 39193dd8851e..5183be2bbe4f 100644 +--- a/src/modules/alsa/mixer/paths/analog-output-speaker.conf ++++ b/src/modules/alsa/mixer/paths/analog-output-speaker.conf +@@ -73,8 +73,8 @@ volume = off + ; This profile path is intended to control the speaker, let's mute headphones + ; else there will be a spike when plugging in headphones + [Element Headphone] +-switch = off +-volume = off ++switch = on ++volume = ignore + + [Element Headphone2] + switch = off diff --git a/meta-digi-dey/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend b/meta-digi-dey/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend new file mode 100644 index 000000000..3ee26fa5c --- /dev/null +++ b/meta-digi-dey/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend @@ -0,0 +1,7 @@ +# Copyright (C) 2017 Digi International + +FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" + +SRC_URI_append_ccimx6ulsbc = " file://0001-pulseaudio-keep-headphones-volume-in-platforms-witho.patch" + +PACKAGE_ARCH = "${MACHINE_ARCH}"