Re: [LAD] Alsa works fine the default output but distorts/stutters with hw:0/plughw:0

From: Clemens Ladisch <clemens@email-addr-hidden>
Date: Tue Jul 16 2013 - 22:11:27 EEST

Muffinman wrote:
> snd_pcm_hw_params_any(alsa_handle, alsa_params);
> snd_pcm_hw_params_set_access(alsa_handle, alsa_params, SND_PCM_ACCESS_RW_INTERLEAVED);
> snd_pcm_hw_params_set_format(alsa_handle, alsa_params, SND_PCM_FORMAT_S16);
> snd_pcm_hw_params_set_channels(alsa_handle, alsa_params, 2);
> snd_pcm_hw_params_set_rate_near(alsa_handle, alsa_params, (unsigned int *)&sample_rate, &dir);

You must check for errors.

> snd_pcm_uframes_t frames = 32;
> snd_pcm_hw_params_set_period_size_near(alsa_handle, alsa_params, &frames, &dir);

Do you really need a period length of 7 ms?

You do not set the buffer size. Try 0.5 s or something like that.

Regards,
Clemens
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Wed Jul 17 08:15:02 2013

This archive was generated by hypermail 2.1.8 : Wed Jul 17 2013 - 08:15:02 EEST