Multiple files created by arecord
Asked Answered
E

2

7

I've made custom distribution using buildroot, with hard-flow for ARMv7 processor. Everything is working except....

# arecord -D hw:0,0 -fdat -d 5 test.wav

This makes multiple files. Thousands of them.

-rw-r--r--    1 root     root        958508 Jan  1 00:19 test-01.wav
-rw-r--r--    1 root     root            44 Jan  1 00:19 test-02.wav
-rw-r--r--    1 root     root            44 Jan  1 00:19 test-03.wav
-rw-r--r--    1 root     root            44 Jan  1 00:19 test-04.wav
-rw-r--r--    1 root     root            44 Jan  1 00:19 test-05.wav
-rw-r--r--    1 root     root            44 Jan  1 00:19 test-06.wav
-rw-r--r--    1 root     root            44 Jan  1 00:19 test-07.wav
-rw-r--r--    1 root     root            44 Jan  1 00:19 test-08.wav
-rw-r--r--    1 root     root            44 Jan  1 00:19 test-09.wav
-rw-r--r--    1 root     root            44 Jan  1 00:19 test-10.wav
-rw-r--r--    1 root     root            44 Jan  1 00:19 test-100.wav
-rw-r--r--    1 root     root            44 Jan  1 00:19 test-101.wav
-rw-r--r--    1 root     root            44 Jan  1 00:19 test-102.wav
-rw-r--r--    1 root     root            44 Jan  1 00:19 test-103.wav
-rw-r--r--    1 root     root            44 Jan  1 00:19 test-104.wav
-rw-r--r--    1 root     root            44 Jan  1 00:19 test-105.wav
-rw-r--r--    1 root     root            44 Jan  1 00:19 test-106.wav

And so on...

This happens if I pass -d parameter. Any idea?

Excise answered 8/7, 2014 at 10:51 Comment(2)
Have you checked the audio settings with amixer or alsamixer? You need to enable record sources. I guess you mean hard-float? But that should not matter. You might also try -N, in case the driver is buggy.Convince
In theory, the first file should have 960044 bytes. This looks as if 64-bit arithmetic is not handled correctly.Nearly
P
7

The problem seems to appear on ARM architecture starting from 1.0.28 arecord version (arecord --version). On Raspberry Pi 3 running Raspbian Jessie I managed to downgrade alsa-utils from 1.0.28-1 to 1.0.25-4 (rolling back to Wheezy's repo), so that fixed the problem:

  • sudo nano /etc/apt/sources.list
  • add the following line to the end of the file deb http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi
  • sudo apt-get update
  • sudo aptitude versions alsa-utils (this should show the old version to become available)
  • sudo apt-get install alsa-utils=1.0.25-4
  • now arecord --version should display downgraded version 1.0.25
  • You probably now want to remove that line you added to /etc/apt/sources.list, so that you don't get other packages from wheezy
  • sudo nano /etc/apt/sources.list
  • remove the line deb http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi
  • run apt-get update again
  • also, put alsa-utils on hold so it doesn't get upgraded
  • sudo apt-mark hold alsa-utils
Potsherd answered 12/8, 2016 at 2:55 Comment(0)
C
5

As an alternative solution is to upgraded alsa-utils to the latest version 1.1.3 from source. This is how I have done it on my Raspberry Pi 3

  1. mkdir ~/alsa-utils
  2. cd ~/alsa-utils/
  3. wget ftp://ftp.alsa-project.org/pub/utils/alsa-utils-1.1.3.tar.bz2
  4. tar xvjf alsa-utils-1.1.3.tar.bz2
  5. cd ~/alsa-utils/alsa-utils-1.1.3/
  6. sudo apt-get install libncursesw5-dev
  7. ./configure --disable-alsaconf --disable-bat --disable-xmlto --with-curses=ncursesw
  8. make
  9. sudo make install
  10. arecord --version
Cattleya answered 1/3, 2017 at 19:6 Comment(1)
Latest version as of 2018 January is 1.1.5, just update the version number accordingly in the commands.Cattleya

© 2022 - 2024 — McMap. All rights reserved.