diff options
author | George Nita <george.nita@enea.com> | 2015-09-03 05:12:11 +0200 |
---|---|---|
committer | George Nita <george.nita@enea.com> | 2015-09-03 05:12:11 +0200 |
commit | 3ab7b40622ac62f2e8876adabfbfbcb80e62bb2e (patch) | |
tree | 4428c3f371f1398555c203d1cb32088b41aceda4 /meta-nuc/recipes-core/initscripts/initscripts/hdmi_port_audio.sh | |
parent | a83cdb055a432ca3554b4ce7aab4ccd2243a5730 (diff) | |
parent | cea00968b858b60222d68103491f076067d73876 (diff) | |
download | meta-intel-3ab7b40622ac62f2e8876adabfbfbcb80e62bb2e.tar.gz |
Merge remote-tracking branch 'origin/master' into master-enea
Diffstat (limited to 'meta-nuc/recipes-core/initscripts/initscripts/hdmi_port_audio.sh')
-rw-r--r-- | meta-nuc/recipes-core/initscripts/initscripts/hdmi_port_audio.sh | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/meta-nuc/recipes-core/initscripts/initscripts/hdmi_port_audio.sh b/meta-nuc/recipes-core/initscripts/initscripts/hdmi_port_audio.sh deleted file mode 100644 index 69d8a53f..00000000 --- a/meta-nuc/recipes-core/initscripts/initscripts/hdmi_port_audio.sh +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | ### BEGIN INIT INFO | ||
3 | # Provides: | ||
4 | # Required-Start: | ||
5 | # Required-Stop: | ||
6 | # Default-Start: S | ||
7 | # Default-Stop: | ||
8 | # Short-Description: Configure ALSA audio output to the connected HDMI port | ||
9 | ### END INIT INFO | ||
10 | |||
11 | # | ||
12 | # If both HDMI ports are connected then use HDMI0 for default ALSA audio out.. | ||
13 | |||
14 | ALSA_CONF_FILE="/etc/asound.conf" | ||
15 | |||
16 | HDMI0_STATUS_FILE="/sys/class/drm/card0-HDMI-A-1/status" | ||
17 | HDMI1_STATUS_FILE="/sys/class/drm/card0-HDMI-A-2/status" | ||
18 | |||
19 | HDMI0_ALSA_CONF="hw:0,3" | ||
20 | HDMI1_ALSA_CONF="hw:0,7" | ||
21 | |||
22 | if [ -f "${HDMI0_STATUS_FILE}" ] && [ "`cat ${HDMI0_STATUS_FILE}`" == "connected" ] | ||
23 | then | ||
24 | sed -i "s/pcm *\"hw:[0-9]*,[0-9]*\"/pcm \"${HDMI0_ALSA_CONF}\"/" ${ALSA_CONF_FILE} | ||
25 | elif [ -f "${HDMI1_STATUS_FILE}" ] && [ "`cat ${HDMI1_STATUS_FILE}`" == "connected" ] | ||
26 | then | ||
27 | sed -i "s/pcm \"hw:[0-9]*,[0-9]*\"/pcm \"${HDMI1_ALSA_CONF}\"/" ${ALSA_CONF_FILE} | ||
28 | fi | ||