From d3f45d317979565287d04e46762924e982e04dd1 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Sun, 10 Aug 2014 13:36:13 +0200 Subject: [PATCH] xbmc: remove IMX6 audio patches, add project specific alsa config files Signed-off-by: Stephan Raue --- ...-imx-add-Freescale-imx-audio-support.patch | 69 ------------------- .../usr/share/alsa/cards/imx-hdmi-soc.conf | 32 +++++++++ .../usr/share/alsa/cards/imx-spdif.conf | 32 +++++++++ 3 files changed, 64 insertions(+), 69 deletions(-) delete mode 100644 packages/mediacenter/xbmc/patches/xbmc-998.0004-ADD-imx-add-Freescale-imx-audio-support.patch create mode 100644 projects/Cuboxi/filesystem/usr/share/alsa/cards/imx-hdmi-soc.conf create mode 100644 projects/Cuboxi/filesystem/usr/share/alsa/cards/imx-spdif.conf diff --git a/packages/mediacenter/xbmc/patches/xbmc-998.0004-ADD-imx-add-Freescale-imx-audio-support.patch b/packages/mediacenter/xbmc/patches/xbmc-998.0004-ADD-imx-add-Freescale-imx-audio-support.patch deleted file mode 100644 index acdd932819..0000000000 --- a/packages/mediacenter/xbmc/patches/xbmc-998.0004-ADD-imx-add-Freescale-imx-audio-support.patch +++ /dev/null @@ -1,69 +0,0 @@ -From e062d1adba00d0503a46937eb0957ba6405af36b Mon Sep 17 00:00:00 2001 -From: wolfgar -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 - diff --git a/projects/Cuboxi/filesystem/usr/share/alsa/cards/imx-hdmi-soc.conf b/projects/Cuboxi/filesystem/usr/share/alsa/cards/imx-hdmi-soc.conf new file mode 100644 index 0000000000..78d5b8b6d4 --- /dev/null +++ b/projects/Cuboxi/filesystem/usr/share/alsa/cards/imx-hdmi-soc.conf @@ -0,0 +1,32 @@ +# +# Configuration for iMX6 HDMI output - /usr/share/alsa/cards/imx-hdmi-soc.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 ] + } + ] + } +} diff --git a/projects/Cuboxi/filesystem/usr/share/alsa/cards/imx-spdif.conf b/projects/Cuboxi/filesystem/usr/share/alsa/cards/imx-spdif.conf new file mode 100644 index 0000000000..689c7322ca --- /dev/null +++ b/projects/Cuboxi/filesystem/usr/share/alsa/cards/imx-spdif.conf @@ -0,0 +1,32 @@ +# +# Configuration for iMX6 SPDIF output - /usr/share/alsa/cards/imx-spdif.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 ] + } + ] + } +}