[AudioI] read error
mark
mvlambiase at gmail.com
Wed Jul 13 00:32:01 UTC 2022
So, this is all on Buster now, but looks just the same.
The second sample did not error out, but delivered what seems like a
not-empty but messed up file. (It does not seem to play)
pi at soundbpi:~/Desktop $ arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: audioinjectorul [audioinjector-ultra], device 0:
bcm2835-i2s-cs4265-dai1 cs4265-dai1-0 [bcm2835-i2s-cs4265-dai1
cs4265-dai1-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
pi at soundbpi:~/Desktop $ arecord -f S16_LE -r 48000 -c 2 -d 3 -D plughw:0
test1.wav
Recording WAVE 'test1.wav' : Signed 16 bit Little Endian, Rate 48000 Hz,
Stereo
arecord: pcm_read:2145: read error: Input/output error
pi at soundbpi:~/Desktop $ arecord -f S32_LE -r 48000 -c 2 -d 3 test.wav
Recording WAVE 'test.wav' : Signed 32 bit Little Endian, Rate 48000 Hz,
Stereo
pi at soundbpi:~/Desktop $ ll
total 1340
-rwxr-xr-x 1 pi pi 132344 Jul 12 14:20 CantinaBand3.wav
-rw-r--r-- 1 pi pi 75044 Jul 12 14:45 file.wav
-rw-r--r-- 1 pi pi 44 Jul 12 15:25 test1.wav
-rw-r--r-- 1 pi pi 1152044 Jul 12 15:26 test.wav
On Tue, Jul 12, 2022 at 8:10 PM mark <mvlambiase at gmail.com> wrote:
> Thanks. My skills are, well, uh, yeah. Let me check those solder joints.
> No scope; no joy there. I was worried this might be a
> construction issue, but I have few tools/skills to check my work.
>
> Thank you.
>
> On Tue, Jul 12, 2022 at 8:03 PM Matt Flax <matt at audioinjector.net> wrote:
>
>> OK, I2C is working, the CPU can communicate with he audio codec IC. That
>> means that the CPU can setup the registers.
>>
>> When it takes many seconds for the system to fail (on aplay or arecord)
>> with something like :
>>
>> arecord: pcm_read:2152: read error: Input/output error
>>
>> It means that the I2S bus has failed to clock. In this case you will
>> want to interrogate the 40 pin header on the card, make sure it is
>> cleanly soldered. Also if you have a cro handy, connect to the I2S bus
>> lines and look for clocking and data. If you have any issues with this,
>> look for dropped solder, dry solder joints or anything which would
>> disrupt the signals.
>>
>> When you see errors like this :
>>
>> arecord: set_params:1407: Unable to install hw params:
>>
>> It means that ALSA couldn't run the *_hwparam_* functions in the driver.
>> In this case the card can't do 44100 Hz sample rates, try to use plughw:
>> instread of hw:
>>
>>
>> Matt
>>
>>
>> On 13/7/22 05:01, mark wrote:
>> > I noticed some weirdness and decided to start with a fresh Bullseye
>> > image.
>> > After a full-upgrade I made the changes mentioned on the git page. The
>> > devices show up when listed, but I cannot get the speakers or
>> > microphones (on-board) to work. It seems like the device is seen but
>> > not really set up.
>> >
>> > Thanks in advance for any help you can provide.
>> >
>> > aplay and arecord see the device:
>> >
>> > pi at soundpi:~ $ arecord -l
>> >
>> > **** List of CAPTURE Hardware Devices ****
>> > card 0: audioinjectorul [audioinjector-ultra], device 0:
>> > bcm2835-i2s-cs4265-dai1 cs4265-dai1-0 [bcm2835-i2s-cs4265-dai1
>> > cs4265-dai1-0]
>> > Subdevices: 1/1
>> > Subdevice #0: subdevice #0
>> > pi at soundpi:~ $ aplay -l
>> > **** List of PLAYBACK Hardware Devices ****
>> >
>> > card 0: audioinjectorul [audioinjector-ultra], device 0:
>> > bcm2835-i2s-cs4265-dai1 cs4265-dai1-0 [bcm2835-i2s-cs4265-dai1
>> > cs4265-dai1-0]
>> > Subdevices: 1/1
>> > Subdevice #0: subdevice #0
>> > card 1: vc4hdmi0 [vc4-hdmi-0], device 0: MAI PCM i2s-hifi-0 [MAI PCM
>> > i2s-hifi-0]
>> >
>> > Subdevices: 1/1
>> > Subdevice #0: subdevice #0
>> > card 2: vc4hdmi1 [vc4-hdmi-1], device 0: MAI PCM i2s-hifi-0 [MAI PCM
>> > i2s-hifi-0]
>> >
>> > Subdevices: 1/1
>> > Subdevice #0: subdevice #0
>> >
>> >
>> > But even though I can see them, I don't seem to know how to use them.
>> > I get an error trying to play on card 0 that gives an interesting
>> > error that may point to a config or software issue:
>> >
>> > pi at soundpi:~/Desktop/recordings $ aplay -D plughw:0,0 CantinaBand3.wav
>> > Playing WAVE 'CantinaBand3.wav' : Signed 16 bit Little Endian, Rate
>> > 22050 Hz, Mono
>> > aplay: set_params:1407: Unable to install hw params:
>> >
>> > ACCESS: RW_INTERLEAVED
>> > FORMAT: S16_LE
>> > SUBFORMAT: STD
>> > SAMPLE_BITS: 16
>> > FRAME_BITS: 16
>> > CHANNELS: 1
>> > RATE: 22050
>> > PERIOD_TIME: (125011 125012)
>> > PERIOD_SIZE: (2756 2757)
>> > PERIOD_BYTES: (5512 5514)
>> > PERIODS: (3 5)
>> > BUFFER_TIME: (500045 500046)
>> > BUFFER_SIZE: 11026
>> > BUFFER_BYTES: 22052
>> > TICK_TIME: 0
>> > pi at soundpi:~/Desktop/recordings $
>> >
>> >
>> >
>> >
>> >
>> > On Tue, Jul 12, 2022 at 7:08 AM mark <mvlambiase at gmail.com> wrote:
>> >
>> > It took a while (10s?) before.
>> > Now I get this immediately:
>> >
>> > evices: 1/1
>> > Subdevice #0: subdevice #0
>> > pi at cam-09:~ $ arecord -f cd -d 10 --device="hw:2,0"
>> /tmp/test-mic.wav
>> > Recording WAVE '/tmp/test-mic.wav' : Signed 16 bit Little Endian,
>> > Rate 44100 Hz, Stereo
>> > arecord: set_params:1407: Unable to install hw params:
>> > ACCESS: RW_INTERLEAVED
>> > FORMAT: S16_LE
>> > SUBFORMAT: STD
>> > SAMPLE_BITS: 16
>> > FRAME_BITS: 32
>> > CHANNELS: 2
>> > RATE: 44100
>> > PERIOD_TIME: (125011 125012)
>> > PERIOD_SIZE: 5513
>> > PERIOD_BYTES: 22052
>> > PERIODS: 4
>> > BUFFER_TIME: (500045 500046)
>> > BUFFER_SIZE: 22052
>> > BUFFER_BYTES: 88208
>> > TICK_TIME: 0
>> >
>> > This most recent one (after a reboot that changed the card $)
>> > laste the full 30 seconds and showed the mixer EQ at the bottom.
>> > That was pegged at 99% the whole time.
>> > I need to move the file to see if I can hear anything but it looks
>> > like it died the same way.
>> >
>> > pi at cam-09:~ $ arecord --device="hw:2,0" -c2 -r 48000 -f S32_LE -t
>> > wav -V stereo -d 30 -v file_stereo.wav
>> > Recording WAVE 'file_stereo.wav' : Signed 32 bit Little Endian,
>> > Rate 48000 Hz, Stereo
>> > Hardware PCM card 2 'audioinjector-ultra' device 0 subdevice 0
>> > Its setup is:
>> > stream : CAPTURE
>> > access : RW_INTERLEAVED
>> > format : S32_LE
>> > subformat : STD
>> > channels : 2
>> > rate : 48000
>> > exact rate : 48000 (48000/1)
>> > msbits : 32
>> > buffer_size : 24000
>> > period_size : 6000
>> > period_time : 125000
>> > tstamp_mode : NONE
>> > tstamp_type : MONOTONIC
>> > period_step : 1
>> > avail_min : 6000
>> > period_event : 0
>> > start_threshold : 1
>> > stop_threshold : 24000
>> > silence_threshold: 0
>> > silence_size : 0
>> > boundary : 1572864000
>> > appl_ptr : 0
>> > hw_ptr : 0
>> > +#################################
>> > 99%|99%##################################+ arecord: pcm_read:2152:
>> > read error: Input/output error
>> >
>> >
>> >
>> > On Tue, Jul 12, 2022 at 1:56 AM Matt Flax <matt at audioinjector.net>
>> > wrote:
>> >
>> > It looks like it should work.
>> >
>> > The fact that ALSA/Linux finds the card and sets it up means
>> > that you
>> > have got I2C working.
>> >
>> > Perhaps there is a clocking I2S bus issue ? How long does it
>> > take before
>> > it reports the error ?
>> >
>> > Matt
>> >
>> > On 12/7/22 15:34, mark via People wrote:
>> > > Excited to add audio to my Pi, and just finished assembling
>> > the boards.
>> > > I see the device listed with arecord -l.
>> > > But, when I go to capture there is a read error. Any
>> > suggestions on
>> > > how to troubleshoot appreciated.
>> > >
>> > > pi at cam-09:~ $ sudo arecord -l
>> > > **** List of CAPTURE Hardware Devices ****
>> > > card 0: audioinjectorul [audioinjector-ultra], device 0:
>> > > bcm2835-i2s-cs4265-dai1 cs4265-dai1-0 [bcm2835-i2s-cs4265-dai1
>> > > cs4265-dai1-0]
>> > > Subdevices: 1/1
>> > > Subdevice #0: subdevice #0
>> > > pi at cam-09:~ $ arecord --device="hw:0,0" -c2 -r 48000 -f
>> > S32_LE -t wav
>> > > -V stereo -d 30 -v file_stereo.wav
>> > > Recording WAVE 'file_stereo.wav' : Signed 32 bit Little
>> > Endian, Rate
>> > > 48000 Hz, Stereo
>> > > Hardware PCM card 0 'audioinjector-ultra' device 0 subdevice 0
>> > > Its setup is:
>> > > stream : CAPTURE
>> > > access : RW_INTERLEAVED
>> > > format : S32_LE
>> > > subformat : STD
>> > > channels : 2
>> > > rate : 48000
>> > > exact rate : 48000 (48000/1)
>> > > msbits : 32
>> > > buffer_size : 24000
>> > > period_size : 6000
>> > > period_time : 125000
>> > > tstamp_mode : NONE
>> > > tstamp_type : MONOTONIC
>> > > period_step : 1
>> > > avail_min : 6000
>> > > period_event : 0
>> > > start_threshold : 1
>> > > stop_threshold : 24000
>> > > silence_threshold: 0
>> > > silence_size : 0
>> > > boundary : 1572864000
>> > > appl_ptr : 0
>> > > hw_ptr : 0
>> > > arecord: pcm_read:2152: read error: Input/output error
>> > > pi at cam-09:~ $
>> > >
>> > >
>> > >
>> > --
>> > Checkout the community email list :
>> > https://lists.audioinjector.net/mailman/listinfo/people
>> >
>> >
>> --
>> Checkout the community email list :
>> https://lists.audioinjector.net/mailman/listinfo/people
>>
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.audioinjector.net/pipermail/people/attachments/20220712/0e380bee/attachment-0001.htm>
More information about the People
mailing list