Stale data at start of audio recording in imx28evk with 3.14 kernel

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Stale data at start of audio recording in imx28evk with 3.14 kernel

1,543 Views
CraigMcQueen
Contributor III

I'm testing the 3.14.19 kernel on imx28evk, with a Yocto build that uses the linux-fslc kernel provider.

I am doing audio recordings through the SGTL5000 driver as such:

arecord -D hw:0,1 -f s16 -c 2 -r 16000 -d 5 test.wav

(the -d 5 option specifies the recording duration)

I'm finding that the first 400-500 ms of the saved data is actually stale data from the end of the previous recording. To see this, do the following:

  1. Provide some test audio input in the LINE INPUT jack. E.g. a 100 Hz sine wave, or some music.
  2. Record audio with e.g. arecord -D hw:0,1 -f s16 -c 2 -r 16000 -d 5 test1.wav
  3. Change the test audio input, e.g. a 150 Hz sine wave, or some different music.
  4. Record a new audio file with e.g. arecord -D hw:0,1 -f s16 -c 2 -r 16000 -d 5 test2.wav

Observe that the first 400-500 ms of test2.wav contains stale data from the end of the previous recording.

Can anyone replicate and confirm this? Can anyone recommend a fix or a bug hypothesis?

Labels (2)
Tags (1)
0 Kudos
Reply
6 Replies

1,306 Views
fabio_estevam
NXP Employee
NXP Employee

Could you try to run the same test on 3.18-rc4?

If you still see the problem there, please report it to the alsa-devel mailing list.

1,306 Views
CraigMcQueen
Contributor III

I've built a 3.18-rc4 kernel. I retested this issue, and found that it is still present under that kernel. So I'll report it to alsa-devel.

0 Kudos
Reply

1,306 Views
CraigMcQueen
Contributor III

I'm fairly new to Yocto, so not entirely familiar with using a bleeding-edge kernel. But anyway, I will try to figure out how to do it. Is your type of workflow documented online somewhere?

I have a kernel git repo which I can fetch from git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git as well as git@github.com:Freescale/linux-fslc.git. I can see v3.18-rc3 from g.k.o. stable, but I can't see 3.18-rc4. Is 3.18-rc3 good enough, or else where can I get 3.18-rc4?

0 Kudos
Reply

1,306 Views
fabio_estevam
NXP Employee
NXP Employee

Hi Craig,

On my daily work I need to switch between several kernel versions and I just build it manually (export the toolchain, make mxs_defconfig, make), so I don't use Yocto to generate the kernel for me.

I use the kernel from kernel.org (sometimes mainline, sometimes linux-next - it depends on what I am working).

Hope this helps.

1,306 Views
CraigMcQueen
Contributor III

I'm trying the stand-alone kernel build, and finding that ARM gcc 4.8.2 (which Yocto is using) is blacklisted.

What ARM gcc version are you using? Did you build the gcc toolchain within Yocto (I see poky master has gcc 4.9), or did you just compile the ARM gcc cross-compiler version 4.9 (or other version) stand-alone?

I assume I don't need to rebuild everything, just the kernel.

0 Kudos
Reply

1,306 Views
CraigMcQueen
Contributor III

Oh, I see the latest commit 206c5f60a3 in g.k.o. stable has comment "Linux 3.18-rc4". It's just not tagged.

0 Kudos
Reply