Skip to content
Advertisement

Tag: alsa

Linux/ALSA: Callback when frame is written to sound card

I’m new to sound programming and ALSA. I’d like to create a little application, that for example prints out to the console when a frame of data is written to ALSA with snd_pcm_writei(…). Is that possible and if so, how? Currently I’m thinking of registering a callback to ALSA so when an application calls snd_pcm_writei(…) the callback is executed. But

Controlling Jabra 710 USB speaker volume from linux host

I am using Linux (2.6.39 kernel) and trying to find a way that would allow me to send volume increment/decrement commands from my host Linux OS to the Jabra device. I saw this functionality is possible both in Windows and Ubuntu, where controlling of the volume from the PC alters the Jabra volume. I am able to accept Consumer HID

How to properly set up ALSA device

Edit: This question is different than the proposed duplicate because I’m asking How do you set the period/buffer size that will work with multiple targets each with different sound hardware?. I have created some code that attempts to set up ALSA before playback of an OGG file. The code below works on one embedded Linux platform, but on another it

Setting channel volume in ALSA

My app plays raw PCM audio data through various channels using ALSA. I’m allocating a new audio channel by using snd_pcm_open(), then setting the PCM format via the snd_pcm_hw_params_xxx() calls and finally feeding raw PCM audio data to ALSA by using the snd_pcm_writei() API. This is all working fine so far but I haven’t found any way to tell ALSA

ALSA vs PulseAudio – Latency Concerns

Good day, I have been debating some details with a colleague about ALSA vs PulseAudio, and need some help coming to a conclusion with it. It’s to my understanding that ALSA is relatively low-level, and talks directly to the hardware, while PulseAudio sits on top of ALSA as a service. Additionally, it’s to my understanding that ALSA is tied to

ALSA: Ways to prevent underrun for speaker

I am playing a single channel audio in non-interleaved mode. I am getting underrun when I am writing audio data into speaker : ALSA lib pcm.c:7339:(snd_pcm_recover) underrun occurred Here is how I write: What are the different ways/parameter configurations to prevent ALSA under run ? (I am using Linux 3.0, ARM ) Edit: Here is a buffer measurement using snd_pcm_avail()

Advertisement