Created
April 21, 2014 12:32
-
-
Save warped-rudi/11141477 to your computer and use it in GitHub Desktop.
XBMC iMX6 audio device test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# 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 ] | |
} | |
] | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# 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 ] | |
} | |
] | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp 2014-04-21 13:36:56.099428215 +0200 | |
+++ b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp 2014-04-21 13:36:56.111428214 +0200 | |
@@ -721,9 +721,11 @@ | |
* We don't want to do that if "default" can handle multichannel | |
* itself (e.g. in case of a pulseaudio server). */ | |
+#ifndef WANDBOARD_ENUM | |
/* For Wandboard, we do not enurate default device as it will be grabbed | |
* as one of the sysdefault devices... */ | |
- | |
+ EnumerateDevice(list, "default", "", config); | |
+#endif | |
void **hints; | |
@@ -774,8 +776,11 @@ | |
* found by the enumeration process. Skip them as well ("hw", "dmix", | |
* "plughw", "dsnoop"). */ | |
- /* For wandboard all devices are prefixed by sysdefault so do not ignore them */ | |
else if (baseName != "default" | |
+#ifndef WANDBOARD_ENUM | |
+ /* For wandboard all devices are prefixed by sysdefault so do not ignore them */ | |
+ && baseName != "sysdefault" | |
+#endif | |
&& baseName != "surround40" | |
&& baseName != "surround41" | |
&& baseName != "surround50" | |
@@ -884,6 +889,7 @@ | |
AEDeviceType CAESinkALSA::AEDeviceTypeFromName(const std::string &name) | |
{ | |
+#ifdef WANDBOARD_ENUM | |
std::size_t found; | |
/* Hack : Check for specific wandboard sound device names */ | |
@@ -898,7 +904,7 @@ | |
found = name.find("sgtl5000audio"); | |
if (found!=std::string::npos) | |
return AE_DEVTYPE_PCM; | |
- | |
+#endif | |
if (name.substr(0, 4) == "hdmi") | |
return AE_DEVTYPE_HDMI; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment