mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
xbmc: remove IMX6 audio patches, add project specific alsa config files
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
2a8a07dfa9
commit
d3f45d3179
@ -1,69 +0,0 @@
|
||||
From e062d1adba00d0503a46937eb0957ba6405af36b Mon Sep 17 00:00:00 2001
|
||||
From: wolfgar <stephan.rafin@laposte.net>
|
||||
Date: Fri, 31 Jan 2014 14:43:24 +0100
|
||||
Subject: [PATCH 4/4] ADD: [imx] add Freescale imx audio support
|
||||
|
||||
---
|
||||
xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp | 25 +++++++++++++++++++++++++
|
||||
1 file changed, 25 insertions(+)
|
||||
|
||||
diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
|
||||
index 8dee4bc..871ecc0 100644
|
||||
--- a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
|
||||
+++ b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
|
||||
@@ -1079,12 +1079,17 @@ void CAESinkALSA::EnumerateDevicesEx(AEDeviceInfoList &list, bool force)
|
||||
snd_config_t *config;
|
||||
snd_config_copy(&config, snd_config);
|
||||
|
||||
+#ifndef HAS_IMXFB
|
||||
/* Always enumerate the default device.
|
||||
* Note: If "default" is a stereo device, EnumerateDevice()
|
||||
* will automatically add "@" instead to enable surroundXX mangling.
|
||||
* We don't want to do that if "default" can handle multichannel
|
||||
* itself (e.g. in case of a pulseaudio server). */
|
||||
+
|
||||
+ /* For IMX6, we do not enurate default device as it will be grabbed
|
||||
+ * as one of the sysdefault devices... */
|
||||
EnumerateDevice(list, "default", "", config);
|
||||
+#endif
|
||||
|
||||
void **hints;
|
||||
|
||||
@@ -1136,7 +1141,10 @@ void CAESinkALSA::EnumerateDevicesEx(AEDeviceInfoList &list, bool force)
|
||||
* "plughw", "dsnoop"). */
|
||||
|
||||
else if (baseName != "default"
|
||||
+#ifndef HAS_IMXFB
|
||||
+ /* For wandboard all devices are prefixed by sysdefault so do not ignore them */
|
||||
&& baseName != "sysdefault"
|
||||
+#endif
|
||||
&& baseName != "surround40"
|
||||
&& baseName != "surround41"
|
||||
&& baseName != "surround50"
|
||||
@@ -1245,6 +1253,23 @@ void CAESinkALSA::EnumerateDevicesEx(AEDeviceInfoList &list, bool force)
|
||||
|
||||
AEDeviceType CAESinkALSA::AEDeviceTypeFromName(const std::string &name)
|
||||
{
|
||||
+#ifdef HAS_IMXFB
|
||||
+ std::size_t found;
|
||||
+
|
||||
+ /* Hack : Check for specific wandboard sound device names */
|
||||
+ found = name.find("imxspdif");
|
||||
+ if (found!=std::string::npos)
|
||||
+ return AE_DEVTYPE_IEC958;
|
||||
+
|
||||
+ found = name.find("imxhdmisoc");
|
||||
+ if (found!=std::string::npos)
|
||||
+ return AE_DEVTYPE_HDMI;
|
||||
+
|
||||
+ found = name.find("sgtl5000audio");
|
||||
+ if (found!=std::string::npos)
|
||||
+ return AE_DEVTYPE_PCM;
|
||||
+#endif
|
||||
+
|
||||
if (name.substr(0, 4) == "hdmi")
|
||||
return AE_DEVTYPE_HDMI;
|
||||
else if (name.substr(0, 6) == "iec958" || name.substr(0, 5) == "spdif")
|
||||
--
|
||||
1.9.3
|
||||
|
@ -0,0 +1,32 @@
|
||||
#
|
||||
# Configuration for iMX6 HDMI output - /usr/share/alsa/cards/imx-hdmi-soc.conf
|
||||
#
|
||||
|
||||
<confdir:pcm/hdmi.conf>
|
||||
|
||||
imx-hdmi-soc.pcm.hdmi.0 {
|
||||
@args [ CARD AES0 AES1 AES2 AES3 ]
|
||||
@args.CARD { type string }
|
||||
@args.AES0 { type integer }
|
||||
@args.AES1 { type integer }
|
||||
@args.AES2 { type integer }
|
||||
@args.AES3 { type integer }
|
||||
type hooks
|
||||
slave.pcm {
|
||||
type hw
|
||||
card $CARD
|
||||
}
|
||||
hooks.0 {
|
||||
type ctl_elems
|
||||
hook_args [
|
||||
{
|
||||
interface MIXER
|
||||
name "IEC958 Playback Default"
|
||||
lock true
|
||||
preserve true
|
||||
optional true
|
||||
value [ $AES0 $AES1 $AES2 $AES3 ]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
#
|
||||
# Configuration for iMX6 SPDIF output - /usr/share/alsa/cards/imx-spdif.conf
|
||||
#
|
||||
|
||||
<confdir:pcm/iec958.conf>
|
||||
|
||||
imx-spdif.pcm.iec958.0 {
|
||||
@args [ CARD AES0 AES1 AES2 AES3 ]
|
||||
@args.CARD { type string }
|
||||
@args.AES0 { type integer }
|
||||
@args.AES1 { type integer }
|
||||
@args.AES2 { type integer }
|
||||
@args.AES3 { type integer }
|
||||
type hooks
|
||||
slave.pcm {
|
||||
type hw
|
||||
card $CARD
|
||||
}
|
||||
hooks.0 {
|
||||
type ctl_elems
|
||||
hook_args [
|
||||
{
|
||||
interface MIXER
|
||||
name "IEC958 Playback Default"
|
||||
lock true
|
||||
preserve true
|
||||
optional true
|
||||
value [ $AES0 $AES1 $AES2 $AES3 ]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user