[alsa-devel] While writing to speaker sometimes segmentation fault comes.
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
ranjith vs wrote:
i'm getting segmentation fault in the snd_pcm_writei function.
Then there's something wrong with the code that calls it.
I'd guess that you computed the frames parameter as bytes.
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
Hello,
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
ranjith vs wrote:
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
participants (2)
-
Clemens Ladisch
-
ranjith vs