[ALSA/PulseAudio] Can't capture audio

cancel
Showing results for 
Search instead for 
Did you mean: 

[ALSA/PulseAudio] Can't capture audio

1,062 Views
koenraadverheyd
Contributor II

Hey all,

I am using the Pico-i.MX6UL using Yocto (fsl-community-bsp). I can't capture audio from the codec (sgtl5000).

The soundcard is detected fine and I can playback sound. But when I record audio (using arecord) I get silence.

The capture device is recognized:

$ arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: sgtl5000audio [sgtl5000-audio], device 0: HiFi sgtl5000-0 []
    Subdevices: 1/1
    Subdevice #0: subdevice #0

The relevant controls in amixer:

$ amixer
Simple mixer control 'Mic',0
    Capabilities: volume volume-joined
    Playback channels: Mono
    Capture channels: Mono
    Limits: 0 - 3
    Mono: 3 [100%] [40.00dB]
Simple mixer control 'Capture',0
    Capabilities: cvolume
    Capture channels: Front Left - Front Right
    Limits: Capture 0 - 15
    Front Left: Capture 15 [100%]
    Front Right: Capture 15 [100%]
Simple mixer control 'Capture Attenuate Switch (-6dB)',0
    Capabilities: pswitch pswitch-joined
    Playback channels: Mono
    Mono: Playback [on]
Simple mixer control 'Capture Mux',0
    Capabilities: enum
    Items: 'MIC_IN' 'LINE_IN'
    Item0: 'MIC_IN'
Simple mixer control 'Capture ZC',0
    Capabilities: pswitch pswitch-joined
    Playback channels: Mono
    Mono: Playback [on]

What seems off here is that control 'Mic' does not have an on / off switch.

Similarly in alsamixer I can't select any channel as capture device.

alsamixer.png

Does anyone have experience with this? I can't find any information about this online.

It seems the sound card does not support audio capturing?

All the best,

Koenraad

Labels (3)
Tags (2)
0 Kudos
4 Replies

221 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Koenraad

one can look at

[PATCH 0/2] ASoC: fsl: make snd-soc-imx-sgtl5000 driver useable on i.MX6UL 

and try with imx-test (../mxc_sound_test)

imx-test
www.nxp.com/lgfiles/NMG/MAD/YOCTO/imx-test-5.7.tar.gz

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

221 Views
koenraadverheyd
Contributor II

Thanks igorpadykov,

I've applied both patches and flashed the device again, but nothing seems changed. Is there some configuration that has to be done as well?

I've tried out the imx-tests, but couldn't get them to work. When I want to make the mxc_sound_test I get the following log:

make -C /home/iotivity/yocto/imx-test-5.7/test mxc_sound_test
make[1]: Entering directory '/home/iotivity/yocto/imx-test-5.7/test'
make -C mxc_sound_test mxc_sound_test
make[2]: Entering directory '/home/iotivity/yocto/imx-test-5.7/test/mxc_sound_test'
make[2]: *** No rule to make target 'mxc_sound_test'.  Stop.
make[2]: Leaving directory '/home/iotivity/yocto/imx-test-5.7/test/mxc_sound_test'
Makefile:15: recipe for target 'mxc_sound_test' failed
make[1]: [mxc_sound_test] Error 2 (ignored)
make[1]: Leaving directory '/home/iotivity/yocto/imx-test-5.7/test'

I executed the command as following:

$ make PLATFORM=IMX6UL \
  LINUXPATH=~/yocto/fsl-community-bsp/build-fslc/tmp/work-shared/imx6ul-pico-hobbit/kernel-source \
  KBUILD_OUTPUT=~/yocto/fsl-community-bsp/build-fslc/tmp/work-shared/imx6ul-pico-hobbit/kernel-source/Kbuild \
  CROSS_COMPILE=/opt/poky/2.2.1/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/ \

Thanks.

0 Kudos

221 Views
igorpadykov
NXP TechSupport
NXP TechSupport

one can try debug it in linux/sound/soc/fsl/fsl_sai.c

please use Chapter 42 Synchronous Audio Interface (SAI) i.MX6UL Reference Manual

http://cache.freescale.com/files/32bit/doc/ref_manual/IMX6ULRM.pdf

Best regards
igor

0 Kudos

221 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Koenraad

for sgtl5000 settings one can check AN3663

SGTL5000 Initialization and Programming - Application Note

SGTL5000, Low Power Stereo Codec EVB|NXP 

For help with porting software NXP has Professional Services:

http://www.nxp.com/support/nxp-professional-services:PROFESSIONAL-SERVICE

Best regards
igor

0 Kudos