While writing to speaker sometimes segmentation fault comes.
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hello,
I am streaming audio from vlc,in the following formats sampling frequency 44100 stereo 16 bit.On the receiver side receiveing pcm frames
and writing to speaker using alsa interface. But sometimes i'm getting segmentation fault in the snd_pcm_writei function. And one more thing is that eventhough I try to set the buffer size to 4096. It is setting it's own value.But i'm writing the buffer of length which I received from pcm_avail_upadte function.
Thanks & Regards,
Ranjith
Quoted 1 line · ranjith vs
i'm getting segmentation fault in the
snd_pcm_writeifunction.
Then there's something wrong with the code that calls it.
I'd guess that you computed the frames parameter as bytes.
Quoted 2 lines
And one more thing is that eventhough I try to set the buffer size to 4096. It is setting it's own value.
The buffer size is constrained by the hardware capabilities.
Regards,
Clemens
Noise is coming from speaker when I do aplay
In reply to ranjith vsHello,
While doing arecord and aplay I'm able to hear the sound. But some little bit noise is there. How can I reduce the noise. I'm using in i.mx6 board linux.
Thanks & Regards,
Ranjith
Re: Noise is coming from speaker when I do aplay
Quoted 1 line · ranjith vs
While doing arecord and aplay I'm able to hear the sound. But some little bit noise is there. How can I reduce the noise.
That depends on where the noise comes from.
Try disabling playback of any analog inputs.
If that does not help, use a better power supply, or use better-designed hardware.
Regards,
Clemens