LibreELEC Tinkerboard and S/PDIF (prevent passthrough)

  • I have found a bug with Tinkerboard which prevent usage of S/PDIF and passthrough.

    The long story can be found in armbian forum:

    For short description:

    The command "aplay -L|grep iec958" will present "iec958:CARD=OnBoard,DEV=0" but the "DEV=0" must be "DEV=1"

    An workaround can be easily added to the (in LE for tinkerboard) already modified file "/usr/share/alsa/cards/USB-Audio.conf".

    The workaround is:

    1.) copy the original (unmodified) section of above file at the end of the file (original is present in ubuntu, gentoo, armbian, volumio)

    2.) enable the second device with a number <>999 (e.g. 1) and disable the first one with "999" instead of "0" (sections "USB-Audio.pcm.iec958.#" at the end of the file)

    The result of the added section should be look like this (but better formatted ;))

    Display Spoiler

    <confdir:pcm/iec958.conf>

    USB-Audio.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 }

    @func refer

    name {

    @func concat

    strings [

    "cards.USB-Audio."

    { @func card_name card $CARD }

    ".pcm.iec958:CARD=" $CARD

    ",AES0=" $AES0 ",AES1=" $AES1 ",AES2=" $AES2 ",AES3=" $AES3

    ]

    }

    default {

    # FIXME: we cannot set the AES parameters

    type hw

    card $CARD

    device {

    @func refer

    name {

    @func concat

    strings [

    "cards.USB-Audio.pcm.iec958_device."

    { @func card_name card $CARD }

    ]

    }

    default 999

    }

    }

    }

    USB-Audio.pcm.iec958.1 {

    @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 }

    @func refer

    name {

    @func concat

    strings [

    "cards.USB-Audio."

    { @func card_name card $CARD }

    ".pcm.iec958_2:CARD=" $CARD

    ",AES0=" $AES0 ",AES1=" $AES1 ",AES2=" $AES2 ",AES3=" $AES3

    ]

    }

    default {

    # FIXME: we cannot set the AES parameters

    type hw

    card $CARD

    device {

    @func refer

    name {

    @func concat

    strings [

    "cards.USB-Audio.pcm.iec958_2_device."

    { @func card_name card $CARD }

    ]

    }

    default 1

    }

    }

    }

    After the change you cant test the result by:

    alsactl init

    aplay -L|grep iec958

     iec958:CARD=OnBoard,DEV=1

    For the normal user this is not so simple because the read-only file system.

    Who of the tinkerboard developers could do this permanently?

    Edited 2 times, last by gen2thomas (April 29, 2019 at 6:37 PM).