Skip to contentSkip to conversation

ALSA Questions - MUTE and PLAYBACK RATE

DISCUSSION Xavi Alexis 2 participants 4 messages Oct 21, 2010

lore
Share & tools
lore
#0 lore raw

Hello ALSA people,

How do you use the ALSA API to mute the MICROPHONE?

How do you use the ALSA API to mute the SPEAKER?

How do you reduce the playback latency or delay? I am reading my audio and I notice that there is a delay ... or some kind of latency. I want the audio played as soon as it is read or something close to that.

Thanks,
X

#1 lore raw
Quoted 2 lines · Xavi Alexis

How do you use the ALSA API to mute the MICROPHONE? How do you use the ALSA API to mute the SPEAKER?

These questions assume that "the MICROPHONE" and "the SPEAKER" actually exist. However, there are cards that have none, or more than one, or that cannot be muted, or where the muting isn't controllable by software.

In the general case, these settings should be controlled by the user with a mixer application.

What are you trying to do?

Quoted 1 line

How do you reduce the playback latency or delay?

Reduce the buffer size. However, this increases the danger of buffer overruns.

You need low latency only when you are generating sounds in real time in response to external events.

Quoted 1 line

I want the audio played as soon as it is read or something close to that.

Does "read" mean "read from disk" or "capture"?

Regards,
Clemens

#2 lore raw

Thank you Clemens for your answers:

A few more questions:

What is the SPECIFIC function to reduce the BUFFER size?

When I say read ... I am reading the data over a socket ...

Thanks again.

x

________________________________
From: Clemens Ladisch <[email protected]>
To: Xavi Alexis <[email protected]>
Cc: [email protected]
Sent: Thu, October 21, 2010 5:39:46 AM
Subject: Re: [alsa-devel] ALSA Questions - MUTE and PLAYBACK RATE

Quoted 2 lines · Xavi Alexis

How do you use the ALSA API to mute the MICROPHONE? How do you use the ALSA API to mute the SPEAKER?

These questions assume that "the MICROPHONE" and "the SPEAKER" actually exist. However, there are cards that have none, or more than one, or that cannot be muted, or where the muting isn't controllable by software.

In the general case, these settings should be controlled by the user with a mixer application.

What are you trying to do?

Quoted 1 line

How do you reduce the playback latency or delay?

Reduce the buffer size. However, this increases the danger of buffer overruns.

You need low latency only when you are generating sounds in real time in response to external events.

Quoted 1 line

I want the audio played as soon as it is read or something close to that.

Does "read" mean "read from disk" or "capture"?

Regards,
Clemens
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#3 lore raw
Quoted 1 line · Xavi Alexis

What is the SPECIFIC function to reduce the BUFFER size?

The buffer size (or the equivalent time) is a parameter to the snd_pcm_set_params() or one of the snd_pcm_hw_params_set_buffer_* functions.

Regards,
Clemens