mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
core/linux-cubox: S/PDIF passthrough fix
This commit is contained in:
parent
306a514ffe
commit
886cb44329
3 changed files with 153 additions and 2 deletions
110
core/linux-cubox/Kirkwood_SPDIF.conf
Normal file
110
core/linux-cubox/Kirkwood_SPDIF.conf
Normal file
|
@ -0,0 +1,110 @@
|
|||
#
|
||||
# Configuration for Cubox - /usr/share/alsa/cards/Kirkwood_SPDIF.conf
|
||||
#
|
||||
|
||||
<confdir:pcm/front.conf>
|
||||
|
||||
Kirkwood_SPDIF.pcm.front.0 {
|
||||
@args [ CARD ]
|
||||
@args.CARD {
|
||||
type string
|
||||
}
|
||||
type softvol
|
||||
slave.pcm {
|
||||
type hw
|
||||
card $CARD
|
||||
}
|
||||
control {
|
||||
name "PCM Playback Volume"
|
||||
card $CARD
|
||||
}
|
||||
}
|
||||
|
||||
Kirkwood_SPDIF.pcm.default {
|
||||
@args [ CARD ]
|
||||
@args.CARD {
|
||||
type string
|
||||
}
|
||||
type asym
|
||||
playback.pcm {
|
||||
type plug
|
||||
slave.pcm {
|
||||
type softvol
|
||||
slave.pcm {
|
||||
@func concat
|
||||
strings [ "dmix:" $CARD ]
|
||||
}
|
||||
control {
|
||||
name = "PCM Playback Volume"
|
||||
card $CARD
|
||||
}
|
||||
}
|
||||
}
|
||||
capture.pcm {
|
||||
type plug
|
||||
slave.pcm {
|
||||
@func concat
|
||||
strings [ "dnsoop:" $CARD ]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<confdir:pcm/iec958.conf>
|
||||
|
||||
Kirkwood_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 PCM
|
||||
name "IEC958 Playback Default"
|
||||
lock true
|
||||
preserve true
|
||||
optional true
|
||||
value [ 0x06 0x82 0x00 0x01 ]
|
||||
# value [ $AES0 $AES1 $AES2 $AES3 ]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
<confdir:pcm/hdmi.conf>
|
||||
|
||||
Kirkwood_SPDIF.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 PCM
|
||||
name "IEC958 Playback Default"
|
||||
lock true
|
||||
preserve true
|
||||
optional true
|
||||
value [ 0x06 0x82 0x00 0x01 ]
|
||||
# value [ $AES0 $AES1 $AES2 $AES3 ]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
|
@ -19,12 +19,16 @@ source=('config'
|
|||
'change-default-console-loglevel.patch'
|
||||
"http://download.gna.org/cryptodev-linux/cryptodev-linux-${cryptover}.tar.gz"
|
||||
'dovefb_patch1'.patch
|
||||
'dovefb_patch2'.patch)
|
||||
'dovefb_patch2'.patch
|
||||
"kirkwood-spdif-name.patch"
|
||||
"Kirkwood_SPDIF.conf")
|
||||
md5sums=('8e36d8bd727aee9405460816085d350d'
|
||||
'9d3c56a4b999c8bfbd4018089a62f662'
|
||||
'7b0ac1c0a88d8fbe7316db02f21666e6'
|
||||
'f1a0a82c5a957c45d3a118e4f7c2a80e'
|
||||
'778d87956820ce7bffe8bb1a45416d2e')
|
||||
'778d87956820ce7bffe8bb1a45416d2e'
|
||||
'9757a7460741b5284cadd0b12a2d7df6'
|
||||
'a746383e6ce46bcecb662acb3ac21b3f')
|
||||
|
||||
__gitroot="git://github.com/vDorst/linux.git"
|
||||
__gitname="linux"
|
||||
|
@ -53,6 +57,9 @@ build() {
|
|||
patch -Np1 -i "${srcdir}/dovefb_patch1.patch"
|
||||
patch -Np1 -i "${srcdir}/dovefb_patch2.patch"
|
||||
|
||||
# Changed kirkwood spdif name to SPDIF instead of S/PDIF.
|
||||
patch -Np1 -i "${srcdir}/kirkwood-spdif-name.patch"
|
||||
|
||||
cat "${srcdir}/config" > ./.config
|
||||
|
||||
# set extraversion to pkgrel
|
||||
|
@ -143,6 +150,9 @@ package_linux-cubox() {
|
|||
# move module tree /lib -> /usr/lib
|
||||
mkdir -p "${pkgdir}/usr"
|
||||
mv "$pkgdir/lib" "$pkgdir/usr"
|
||||
|
||||
install -Dm644 cp "${srcdir}/Kirkwood_SPDIF.conf" \
|
||||
"${pkgdir}/usr/share/alsa/cards/Kirkwood_SPDIF.conf"
|
||||
}
|
||||
|
||||
package_linux-headers-cubox() {
|
||||
|
|
31
core/linux-cubox/kirkwood-spdif-name.patch
Normal file
31
core/linux-cubox/kirkwood-spdif-name.patch
Normal file
|
@ -0,0 +1,31 @@
|
|||
--- a/sound/soc/kirkwood/kirkwood-spdif.c.orig 2012-11-25 12:55:11.314023286 +0200
|
||||
+++ b/sound/soc/kirkwood/kirkwood-spdif.c 2012-11-25 12:55:37.494024113 +0200
|
||||
@@ -72,8 +72,8 @@
|
||||
|
||||
static struct snd_soc_dai_link kirkwood_spdif_dai0[] = {
|
||||
{
|
||||
- .name = "S/PDIF0",
|
||||
- .stream_name = "S/PDIF0 PCM Playback",
|
||||
+ .name = "SPDIF0",
|
||||
+ .stream_name = "SPDIF0 PCM Playback",
|
||||
.platform_name = "kirkwood-pcm-audio.0",
|
||||
.cpu_dai_name = "kirkwood-i2s.0",
|
||||
.codec_dai_name = "dit-hifi",
|
||||
@@ -84,7 +84,7 @@
|
||||
|
||||
static struct snd_soc_dai_link kirkwood_spdif_dai1[] = {
|
||||
{
|
||||
- .name = "S/PDIF1",
|
||||
+ .name = "SPDIF1",
|
||||
.stream_name = "IEC958 Playback",
|
||||
.platform_name = "kirkwood-pcm-audio.1",
|
||||
.cpu_dai_name = "kirkwood-i2s.1",
|
||||
@@ -135,7 +135,7 @@
|
||||
goto kirkwood_spdif_err_card_alloc;
|
||||
}
|
||||
|
||||
- card->name = "Kirkwood S/PDIF";
|
||||
+ card->name = "Kirkwood SPDIF";
|
||||
card->owner = THIS_MODULE;
|
||||
if (pdev->id == 0)
|
||||
card->dai_link = kirkwood_spdif_dai0;
|
Loading…
Reference in a new issue