5

Hello I am trying to check if a Beaglebone AI is getting correctly I2S from a TIDA-1454 so if I try to arecord test.wav I get:

debian@beaglebone:/etc$ arecord -d 10 ALSA lib pcm_dsnoop.c:638:(snd_pcm_dsnoop_open) unable to open slave arecord: main:828: audio open error: No such file or directory

But the card is detected since i get this output from arecord -l:

**** List of CAPTURE Hardware Devices ****
card 1: PCM5102a [PCM5102a], device 0: davinci-mcasp.0-pcm5102a-hifi pcm5102a-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

or arecord -L:

debian@beaglebone:/var/lib/cloud9$ arecord -L
null
    Discard all samples (playback) or generate zero samples (capture)
onboard
onboard_capture_left
onboard_playback_left
onboard_capture_right
onboard_playback_right
plug_onboard_capture_left
plug_onboard_playback_left
default
sysdefault:CARD=PCM5102a
    PCM5102a,
    Default Audio Device
dmix:CARD=PCM5102a,DEV=0
    PCM5102a,
    Direct sample mixing device
dsnoop:CARD=PCM5102a,DEV=0
    PCM5102a,
    Direct sample snooping device
hw:CARD=PCM5102a,DEV=0
    PCM5102a,
    Direct hardware device without any conversions
plughw:CARD=PCM5102a,DEV=0
    PCM5102a,
    Hardware device with all software conversions

and ALSA configuration:

pcm.onboard{
    type hw
    card 0
}
ctl.onboard {
    type hw
    card 0
}

### Dsnoop splited channels
pcm.onboard_capture_left {
     type dsnoop
     ipc_key 32
     slave {
         pcm "onboard"
         channels 2
     rate 48000
         format S32_LE
     }
     bindings.0  0
}
pcm.onboard_playback_left {
     type dmix
     ipc_key 33
     slave {
         pcm "onboard"
         channels 2
     }
     bindings.0  0
}


pcm.onboard_capture_right {
     type dsnoop
     ipc_key 32
     slave {
         pcm "onboard"
         channels 2
     rate 48000
     format S32_LE
     }
     bindings.0  1
}
pcm.onboard_playback_right {
     type dmix
     ipc_key 33
     slave {
         pcm "onboard"
         channels 2
     }
     bindings.0  1
}


### PLUGS ##
### used with darkice
### device = plug:plug_onboard_left
pcm.plug_onboard_capture_left{
        type plug
        slave.pcm "onboard_capture_left"
}
pcm.plug_onboard_playback_left{
        type plug
        slave.pcm "onboard_playback_left"
}

pcm.!default {
    type asym
    playback.pcm "plug_onboard_playback_left"
    capture.pcm "plug_onboard_capture_left"
}

So what can it be the problem?

Mikel
  • 40
  • 1
  • 9

1 Answers1

0

When recording you should tell alsa what device to use:

**** List of CAPTURE Hardware Devices ****
card 1: PCM5102a [PCM5102a], device 0: davinci-mcasp.0-pcm5102a-hifi >pcm5102a-hifi-0 []
 Subdevices: 1/1
 Subdevice #0: subdevice #0

Your device address is : hw:1,0 (card 1, device 0 )

So :

arecord --device="hw:1,0" test.wav

He should ask you for the format, for instance:

Available format:
- S8
- S16_LE

Then you can add the format :

arecord --device="hw:1,0" -f S16_LE test.wav
vinalti
  • 966
  • 5
  • 26
  • Now i am getting this: `arecord: pcm_read:2145: read error: Input/output error`, don't i need to change something in the ALSA configuration for sure? – Mikel Jan 24 '22 at 11:37
  • I had the same error and fixed it like this. Did you copy paste or tried to figure out for your device what format was supported ? – vinalti Jan 24 '22 at 11:40
  • I did try first without format to figure it out and it said "Available formats: - S16_LE - S24_LE - S32_LE" so I used the S16_LE – Mikel Jan 24 '22 at 11:43
  • Do you have permissions to read the audio input (`audio` group) and to write in the current directory ? – vinalti Jan 24 '22 at 11:44
  • at least to write yes, since the test.wav file is created. How can I check the audio group permissions? or should I just `sudo arecor...` – Mikel Jan 24 '22 at 11:48