diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2022-02-18 19:43:56 -0300 |
---|---|---|
committer | Otavio Salvador <otavio@ossystems.com.br> | 2022-02-21 20:06:28 -0300 |
commit | 30f5ce1d2168389295b4813e01898c2fb0f9bab9 (patch) | |
tree | f6f78dbf8e5eef40510739dc1db79d60f05189fb /recipes-multimedia/pulseaudio/pulseaudio/imx-nxp-bsp/pulseaudio-remove-the-control-for-speaker-headphone-widge.patch | |
parent | a3b102a9ed12ea03e72f713ed40968da1776c6d3 (diff) | |
download | meta-freescale-30f5ce1d2168389295b4813e01898c2fb0f9bab9.tar.gz |
Generalize overrides subsystem for NXP and Mainline support
Essentially, we extend the overrides to a generic-bsp, nxp-bsp, and
mainline-bsp.
So, for example, the mx8mq override is split into:
- imx-generic-bsp: compatible with every i.MX SoC and both BSP variants
- imx-nxp-bsp: compatible with every i.MX SoC but specific to NXP BSP
- imx-mainline-bsp: compatible with every i.MX SoC but specific to Mainline BSP
- mx8-generic-bsp: compatible with every i.MX8 SoC and both BSP variants
- mx8-nxp-bsp: compatible with every i.MX8 SoC but specific to NXP BSP
- mx8-mainline-bsp: compatible with every i.MX8 SoC but specific to Mainline BSP
- mx8m-generic-bsp: compatible with every i.MX8M SoC and both BSP variants
- mx8m-nxp-bsp: compatible with every i.MX8M SoC but specific to NXP BSP
- mx8m-mainline-bsp: compatible with every i.MX8M SoC but specific to Mainline BSP
- mx8mq-generic-bsp: compatible with every i.MX8MQ SoC and both BSP variants
- mx8mq-nxp-bsp: compatible with every i.MX8MQ SoC8 but specific to NXP BSP
- mx8mq-mainline-bsp: compatible with every i.MX8MQ SoC but specific to Mainline BSP
The extender mechanism is responsible for extending the override list to
include the generic overrides. We can then use the three different
variants to handle the metadata correctly.
Generically speaking, the conversion mainly was automated (with a lot of
back and forth until getting it right).
To convert an existing layer, the following script can be used:
```sh
git ls-files classes recipes-* \
| xargs sed -i \
-e 's,:\(mx[6-8]\w*\),:\1-nxp-bsp,g' \
-e 's,(\(mx[6-8]\w*\)),(\1-nxp-bsp),g' \
-e 's,\(mx[6-8]\w*\)|,\1-nxp-bsp|,g' \
-e 's,|\(mx[6-8]\w*\)),|\1-nxp-bsp),g' \
\
-e 's,:\(mx[5s]\w*\),:\1-generic-bsp,g' \
-e 's,(\(mx[5s]\w*\)),(\1-generic-bsp),g' \
-e 's,\(mx[5s]\w*\)|,\1-generic-bsp|,g' \
-e 's,|\(mx[5s]\w*\)),|\1-generic-bsp),g' \
\
-e 's,:\(vf\w*\),:\1-generic-bsp,g' \
-e 's,:\(vf[56]0\w*\),:\1-generic-bsp,g' \
-e 's,\(vf\w*\)|,\1-generic-bsp|,g' \
-e 's,|\(vf\w*\)),|\1-generic-bsp),g' \
-e 's,\(vf[56]0\w*\)|,\1-generic-bsp|,g' \
-e 's,|\(vf[56]0\w*\)),|\1-generic-bsp),g' \
\
-e 's,:\(imx\) ,:\1-nxp-bsp ,g' \
-e 's,(\(imx\)),(\1-nxp-bsp),g' \
-e 's,\(imx\)|,\1-nxp-bsp|,g' \
-e 's,|\(imx\)),|\1-nxp-bsp),g'
for d in $(find -type d | egrep '/mx[6-8]w*'); do
git mv $d $d-nxp-bsp
done
for d in $(find -type d | egrep '/imx$'); do
git mv $d $d-nxp-bsp
done
for d in $(find -type d | egrep '/mx[5s]w*'); do
git mv $d $d-generic-bsp
done
```
Fixes: #791.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'recipes-multimedia/pulseaudio/pulseaudio/imx-nxp-bsp/pulseaudio-remove-the-control-for-speaker-headphone-widge.patch')
-rw-r--r-- | recipes-multimedia/pulseaudio/pulseaudio/imx-nxp-bsp/pulseaudio-remove-the-control-for-speaker-headphone-widge.patch | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/recipes-multimedia/pulseaudio/pulseaudio/imx-nxp-bsp/pulseaudio-remove-the-control-for-speaker-headphone-widge.patch b/recipes-multimedia/pulseaudio/pulseaudio/imx-nxp-bsp/pulseaudio-remove-the-control-for-speaker-headphone-widge.patch new file mode 100644 index 00000000..57c28741 --- /dev/null +++ b/recipes-multimedia/pulseaudio/pulseaudio/imx-nxp-bsp/pulseaudio-remove-the-control-for-speaker-headphone-widge.patch | |||
@@ -0,0 +1,73 @@ | |||
1 | From 33022867d76c91fe4e60699c1b7ebbc8feb4ee93 Mon Sep 17 00:00:00 2001 | ||
2 | From: Shengjiu Wang <shengjiu.wang@freescale.com> | ||
3 | Date: Mon, 30 Mar 2015 10:26:14 +0800 | ||
4 | Subject: [PATCH] pulseaudio: remove the control for speaker/headphone widget | ||
5 | |||
6 | In imx7d-sdb, there is no headphone jack, the jack detection is done | ||
7 | by the codec itself. When headphone plugin, pulseaudio can't detect | ||
8 | the headphone jack status, so it will set the heaphone volume to zero. | ||
9 | Here fix this issue by remove the control in configuration. | ||
10 | |||
11 | Upstream-Status: Inappropriate [i.MX specific] | ||
12 | |||
13 | Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com> | ||
14 | --- | ||
15 | .../alsa/mixer/paths/analog-output-headphones.conf | 8 ++++---- | ||
16 | src/modules/alsa/mixer/paths/analog-output-speaker.conf | 8 ++++---- | ||
17 | 2 files changed, 8 insertions(+), 8 deletions(-) | ||
18 | |||
19 | diff --git a/src/modules/alsa/mixer/paths/analog-output-headphones.conf b/src/modules/alsa/mixer/paths/analog-output-headphones.conf | ||
20 | index 88907f0..7598d2f 100644 | ||
21 | --- a/src/modules/alsa/mixer/paths/analog-output-headphones.conf | ||
22 | +++ b/src/modules/alsa/mixer/paths/analog-output-headphones.conf | ||
23 | @@ -88,8 +88,8 @@ override-map.2 = all-left,all-right | ||
24 | |||
25 | [Element Headphone] | ||
26 | required-any = any | ||
27 | -switch = mute | ||
28 | -volume = merge | ||
29 | +switch = on | ||
30 | +volume = ignore | ||
31 | override-map.1 = all | ||
32 | override-map.2 = all-left,all-right | ||
33 | |||
34 | @@ -119,8 +119,8 @@ switch = mute | ||
35 | volume = zero | ||
36 | |||
37 | [Element Speaker] | ||
38 | -switch = off | ||
39 | -volume = off | ||
40 | +switch = on | ||
41 | +volume = ignore | ||
42 | |||
43 | [Element Desktop Speaker] | ||
44 | switch = off | ||
45 | diff --git a/src/modules/alsa/mixer/paths/analog-output-speaker.conf b/src/modules/alsa/mixer/paths/analog-output-speaker.conf | ||
46 | index fcf2f5c..6f6f898 100644 | ||
47 | --- a/src/modules/alsa/mixer/paths/analog-output-speaker.conf | ||
48 | +++ b/src/modules/alsa/mixer/paths/analog-output-speaker.conf | ||
49 | @@ -91,8 +91,8 @@ volume = off | ||
50 | ; This profile path is intended to control the speaker, let's mute headphones | ||
51 | ; else there will be a spike when plugging in headphones | ||
52 | [Element Headphone] | ||
53 | -switch = off | ||
54 | -volume = off | ||
55 | +switch = on | ||
56 | +volume = ignore | ||
57 | |||
58 | [Element Headphone,1] | ||
59 | switch = off | ||
60 | @@ -115,8 +115,8 @@ override-map.2 = all-left,all-right | ||
61 | |||
62 | [Element Speaker] | ||
63 | required-any = any | ||
64 | -switch = mute | ||
65 | -volume = merge | ||
66 | +switch = on | ||
67 | +volume = ignore | ||
68 | override-map.1 = all | ||
69 | override-map.2 = all-left,all-right | ||
70 | |||
71 | -- | ||
72 | 2.20.1 | ||
73 | |||