AnsweredAssumed Answered

SDK-v2.0: Audio on TWR-LS1021A-PB via SGTL5000 does not work

Question asked by srikanth krishnakar on Jun 17, 2016

I have booted TWR-LS1021A-PB with SDK-v2.0 and found that sound card SGTL5000 fails to register and playback on that card does not work. Could anyone point to test instructions of audio on LS1021A (Rev 2) on SDK-v2.0 ? I know the audio was functional on LS1021A (Rev 1.0) with SDK-v1.8 via SND_SOC_VF610 but now this seems to be removed and generic SGTL5000 is being used.  Are there any specific switch settings for accessing sound card ?

 

Here are the logs of my environment:

 

Note: Test performed on Bank-1

 

U-boot:

---------------------------------

U-Boot 2016.01+ls1+ga9b437f (Jun 15 2016 - 16:23:32 +0530)

CPU:   Freescale LayerScape LS1021E, Version: 2.0, (0x87081120)

Clock Configuration:

       CPU0(ARMV7):1000 MHz,

       Bus:300  MHz, DDR:800  MHz (1600 MT/s data rate),

Reset Configuration Word (RCW):

       00000000: 0608000a 00000000 00000000 00000000

       00000010: 30000000 00007900 e0025a00 21046000

       00000020: 00000000 00000000 00000000 20000000

       00000030: 00080000 481b7340 00000000 00000000

I2C:   ready

Model: LS1021A TWR Board

Board: LS1021ATWR

CPLD:  V2.0

PCBA:  V1.0

VBank: 1

DRAM:  1 GiB

Using SERDES1 Protocol: 48 (0x30)

Firmware 'Microcode version 0.0.1 for LS1021a r1.0' for 1021 V1.0

QE: uploading microcode 'Microcode for LS1021a r1.0' version 0.0.1

Flash: 128 MiB

MMC:   FSL_SDHC: 0

EEPROM: NXID v16777216

PCIe1: Root Complex no link, regs @ 0x3400000

PCIe2: disabled

In:    serial

Out:   serial

Err:   serial

SEC0: RNG instantiated

SATA link 0 timeout.

AHCI 0001.0300 1 slots 1 ports ? Gbps 0x1 impl SATA mode

flags: 64bit ncq pm clo only pmp fbss pio slum part ccc

Found 0 device(s).

SCSI:  Net:   eTSEC1 is in sgmii mode.

eTSEC2 is in sgmii mode.

eTSEC1, eTSEC2, eTSEC3 [PRIME]

Hit any key to stop autoboot:  0

=>

---------------------------------

 

Kernel dmesg info:

--------------------------------

root@ls1021atwr:~# uname -a

Linux ls1021atwr 4.1.8-rt8+ls1+gbd51baf #1 SMP Fri Jun 17 15:18:34 IST 2016 armv7l armv7l armv7l GNU/Linux

root@ls1021atwr:~# dmesg | grep sgtl

[    2.381304] sgtl5000 1-000a: sgtl5000 revision 0x11

[    2.505086] sgtl5000 1-000a: Using internal LDO instead of VDDD

[    2.505093] sgtl5000 1-000a: Looking up VDDA-supply from device tree

[    2.505147] sgtl5000 1-000a: Looking up VDDIO-supply from device tree

[    2.505198] sgtl5000 1-000a: Looking up VDDD_LDO-supply from device tree

[    2.505206] sgtl5000 1-000a: Looking up VDDD_LDO-supply property in node /soc/i2c@2190000/sgtl5000@a failed

[    2.516807] asoc-simple-card sound: sgtl5000 <-> 2b50000.sai mapping ok

[    2.559969]   #0: 2b50000.sai-sgtl5000

root@ls1021atwr:~#

--------------------------------

 

Alsa hangs in the initial state of playback :

-------------------------------------------

root@ls1021atwr:~# aplay -l

**** List of PLAYBACK Hardware Devices ****

card 0: D2b50000saisgtl [2b50000.sai-sgtl5000], device 0: 2b50000.sai-sgtl5000 sgtl5000-0 []

  Subdevices: 1/1

  Subdevice #0: subdevice #0

root@ls1021atwr:~#

root@ls1021atwr:~# ls -l /dev/snd/*

crw-rw---- 1 root audio 116,  0 Jun 17 14:05 /dev/snd/controlC0

crw-rw---- 1 root audio 116, 24 Jun 17 14:05 /dev/snd/pcmC0D0c

crw-rw---- 1 root audio 116, 16 Jun 17 14:05 /dev/snd/pcmC0D0p

crw-rw---- 1 root audio 116, 33 Jun 17 14:05 /dev/snd/timer

 

/dev/snd/by-path:

total 0

lrwxrwxrwx 1 root root 12 Jun 17 14:05 platform-sound -> ../controlC0

root@ls1021atwr:~#

root@ls1021atwr:~# aplay -f S16_LE -r 44100 -t wav -vvv -c 2 test_stereo_44100Hz_16bit_PCM.wav                                                                                                                

Playing WAVE 'test_stereo_44100Hz_16bit_PCM.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo

Hardware PCM card 0 '2b50000.sai-sgtl5000' device 0 subdevice 0

Its setup is:

  stream   : PLAYBACK
  access   : RW_INTERLEAVED
  format   : S16_LE
  subformat: STD
  channels : 2
  rate     : 44100

  exact rate   : 44100 (44100/1)

  msbits   : 16

  buffer_size  : 22052

  period_size  : 5513

  period_time  : 125011

  tstamp_mode  : NONE

  tstamp_type  : MONOTONIC

  period_step  : 1

  avail_min: 5513

  period_event : 0

  start_threshold  : 22052

  stop_threshold   : 22052

  silence_threshold: 0

  silence_size : 0

  boundary : 1445199872
  appl_ptr : 0
  hw_ptr   : 0
Max peak (11026 samples): 0x00000364 #                2%
Max peak (11026 samples): 0x00000b76 ##               8%
Max peak (11026 samples): 0x00000dba ###              10%
Max peak (11026 samples): 0x00000ac0 ##               8%

aplay: pcm_write:1940: write error: Input/output error

root@ls1021atwr:~#

-------------------------------------------

 

The playback hangs in very beginning and returns with I/O error in the end. Any inputs would be really helpful.

 

Thanks,

Skrishna

Outcomes