[RFC PATCH] alsa-sink: Reduce hardware pointer update syscalls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>
> Without patch, with a latency of 48 ms

What is the meaning of 48ms at 44100Hz?

> With the patch, I get the same assertion failed as Peter ("frames > 0").
> With Peter's change, I get this: http://pastebin.com/dWx6fiwT, even with
> no client connected. The reported delay is -5 * default-fragments *
> default-fragment-size-msec.
>

Hwptr of usb audio is calculated from a variable subs->hwptr_done which
update periodically when the  controller submit urbs

This mean this value won't change until next submit

/*
* return the current pcm pointer.  just based on the hwptr_done value.
*/
static snd_pcm_uframes_t snd_usb_pcm_pointer(struct snd_pcm_substream
*substream)
{
struct snd_usb_substream *subs;
unsigned int hwptr_done;

subs = (struct snd_usb_substream *)substream->runtime->private_data;
if (subs->stream->chip->shutdown)
return SNDRV_PCM_POS_XRUN;
spin_lock(&subs->lock);
hwptr_done = subs->hwptr_done;
substream->runtime->delay = snd_usb_pcm_delay(subs,
substream->runtime->rate);
spin_unlock(&subs->lock);
return hwptr_done / (substream->runtime->frame_bits >> 3);
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20141006/303709e2/attachment.html>


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux