A20 Lime 2 SPDIF Input

Started by vmotion, March 28, 2018, 12:19:50 AM

Previous topic - Next topic

vmotion

Hi,

I followed the instructions to activate SPDIF on my Lime 2 board.

- Changed FEX file
- Recompiled Fex File
- Added necessary modules to /etc/modules
- (opt) created correct /etc/asound.conf

Digital output seems to be working and appears in /proc/asound/devices

 
  2: [ 0- 0]: digital audio playback
  3: [ 0- 0]: digital audio capture
  4: [ 0]   : control
  5: [ 1- 0]: digital audio playback
  6: [ 1]   : control
33:        : timer


/proc/asound/cards:


0 [sunxicodec     ]: sunxi-CODEC - sunxi-CODEC
                      sunxi-CODEC  Audio Codec
1 [sunxisndspdif  ]: sunxi-sndspdif - sunxi-sndspdif
                      sunxi-sndspdif


Alas, the digital input does not show up!! Only the digital output does. Could this be a bug of the card?

Here is my FEX file SPDIF section:


[spdif_para]
spdif_used = 1
spdif_mclk =
spdif_dout = port:PB13<4><1><default><default>
spdif_din = port:PB12<4><1><default><default>


Could someone shade some light on this?

Thanks a lot!

LubOlimex

Technical support and documentation manager at Olimex

vmotion

#2
Hi Lub,

Yes. I checked this forum post.
But the problem is different. It is not a mixer issue or ALSA client issue.

Like you can see in the original post, the spdif input device does not even show up in /proc/asound/devices. (For card 1, which is the SPDIF). Card 0 has an input, but this is the CODEC (internal DAC/ADC).

This means that the input not correctly detected / put in service.
Plus my problem is related to SPDIF input, not output. The output seems to be working allright.

For the record, I use the standard kernel 3.4.103, packaged with standard Olimex image.

This post may be related: https://forum.armbian.com/topic/354-activation-of-spdif/?tab=comments#comment-3035

Lub, do you happen to have reports of people getting the SPDIF *input* of the Lime2 working?

Best regards,
V.

Gerrit

Did you make sure port PB12 is not still used as gpio port by removing or comment out the next lines

gpio_pin_42 = port:PB12<0><default><default><default>


pin_42 = port:PB12<0><default><default><default>

vmotion

Hi Gerrit,

Thanks for the tip. I indeed didn't check that the pin was already used.

I commented out the lines you mentionned in my fex file and then recompiled and rebooted, but it didn't change anything.
Still no SPDIF in.

Could it be a kernel driver issue?

Regards,
V.

vmotion

This is a joke!

The whole RX_CTRL function of the sunxi_spdif.c module of the 3.4.103 kernel is empty!!


void sunxi_snd_rxctrl(int on)
{
}


Whereas it is correctly implemented in 3.4.111 kernels.
No wonder it is not working!!

Not nice ...