[alsa-devel] Mixer volume/decibel mapping

Raymond Yau superquad.vortex2 at gmail.com
Sat May 29 03:57:43 CEST 2010


2010/5/25 James Courtier-Dutton <james.dutton at gmail.com>

>
> Could this maybe explain why pulseaudio was having such problems with
> alsa with regards to gain controls????
>


Did you answer PA 's developer 's question in FOMS

http://thread.gmane.org/gmane.linux.alsa.devel/50417/focus=50555

what is the answer of this question ?

- That snd_pcm_sw_params_set_start_threshold(.. , (snd_pcm_uframes_t) -1))
  disables automatic stopping on underrun.

snd_pcm_uframes_t is unsigned and in snd_pcm_write_areas() pcm/pcm.c

start_threshold seem used as a signed number

is this a special case , what is the difference between 1 and -1 ?

		if (state == SND_PCM_STATE_PREPARED) {
			snd_pcm_sframes_t hw_avail = pcm->buffer_size - avail;
			hw_avail += frames;
			/* some plugins might automatically start the stream */
			state = snd_pcm_state(pcm);
			if (state == SND_PCM_STATE_PREPARED &&
			    hw_avail >= (snd_pcm_sframes_t) pcm->start_threshold) {
				err = snd_pcm_start(pcm);
				if (err < 0)
					goto _end;
			}
		}


More information about the Alsa-devel mailing list