All of lore.kernel.org
 help / color / mirror / Atom feed
From: Clemens Ladisch <clemens-P6GI/4k7KOmELgA04lAiVw@public.gmane.org>
To: Laurent Pinchart
	<laurent.pinchart-AgBVmzD5pcezQB+pC5nmwQ@public.gmane.org>
Cc: Steve Calfee
	<stevecalfee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org,
	linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Hal Murray <hmurray-8cQiHa/C+6Go9G/jEpaUCQ@public.gmane.org>
Subject: Re: [alsa-devel] [RFC] ALSA vs. dedicated char device for a USB	Audio Class gadget driver
Date: Fri, 15 May 2009 09:01:48 +0200	[thread overview]
Message-ID: <4A0D135C.7090806@ladisch.de> (raw)
In-Reply-To: <200905142325.24408.laurent.pinchart-AgBVmzD5pcezQB+pC5nmwQ@public.gmane.org>

Laurent Pinchart wrote:
> To copy data from the ALSA ring buffer I need to know how much data is 
> available at that particular moment, in order to avoid buffer underruns.

This is not how ALSA drivers are supposed to work.  The framework was
designed for DMA devices that run asynchronously and just take data out
of the ring buffer whenever they need them.  Your driver should work in
the same way, i.e., you queue a packet of data when you need to queue
it.


Best regards,
Clemens
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2009-05-15  7:01 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <laurent.pinchart@skynet.be>
     [not found] ` <200905141545.01798.laurent.pinchart-AgBVmzD5pcezQB+pC5nmwQ@public.gmane.org>
2009-05-14 18:18   ` [RFC] ALSA vs. dedicated char device for a USB Audio Class gadget driver Hal Murray
2009-05-14 20:58     ` Laurent Pinchart
     [not found]       ` <200905142258.42935.laurent.pinchart-AgBVmzD5pcezQB+pC5nmwQ@public.gmane.org>
2009-05-14 21:12         ` Steve Calfee
     [not found]           ` <4a5ff6bc0905141412t5ab4f0f5x6c50b4e38af0790f-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-05-14 21:25             ` Laurent Pinchart
     [not found]               ` <200905142325.24408.laurent.pinchart-AgBVmzD5pcezQB+pC5nmwQ@public.gmane.org>
2009-05-15  7:01                 ` Clemens Ladisch [this message]
     [not found]                   ` <4A0D135C.7090806-P6GI/4k7KOmELgA04lAiVw@public.gmane.org>
2009-05-15  9:36                     ` Laurent Pinchart
     [not found]                       ` <200905151136.52995.laurent.pinchart-AgBVmzD5pcezQB+pC5nmwQ@public.gmane.org>
2009-05-15 15:07                         ` Clemens Ladisch
     [not found]                           ` <4A0D8532.4070104-P6GI/4k7KOmELgA04lAiVw@public.gmane.org>
2009-05-15 15:52                             ` Laurent Pinchart
     [not found]                               ` <200905151752.58040.laurent.pinchart-AgBVmzD5pcezQB+pC5nmwQ@public.gmane.org>
2009-05-15 17:04                                 ` Clemens Ladisch
2009-05-17 16:49                                   ` Laurent Pinchart
2009-05-15 20:15                                 ` Hal Murray
     [not found]                                   ` <20090515201519.7C347BCE6-1EH7ZSm6cX1tFMQ1DeeEjrzXk6sypdOaHzxsA6J8rrk@public.gmane.org>
2009-05-17 17:25                                     ` Laurent Pinchart
     [not found]                                       ` <200905171925.23956.laurent.pinchart-AgBVmzD5pcezQB+pC5nmwQ@public.gmane.org>
2009-05-17 21:28                                         ` Alan Stern
     [not found]                                           ` <Pine.LNX.4.44L0.0905171654500.20300-100000-pYrvlCTfrz9XsRXLowluHWD2FQJk+8+b@public.gmane.org>
2009-05-18 14:36                                             ` Laurent Pinchart
2009-05-18  8:39                                       ` Clemens Ladisch
     [not found]                                         ` <4A111EBC.2010606-P6GI/4k7KOmELgA04lAiVw@public.gmane.org>
2009-05-18 14:47                                           ` Laurent Pinchart
     [not found]                                             ` <200905181647.41771.laurent.pinchart-AgBVmzD5pcezQB+pC5nmwQ@public.gmane.org>
2009-05-19 11:01                                               ` Clemens Ladisch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A0D135C.7090806@ladisch.de \
    --to=clemens-p6gi/4k7komelga04laivw@public.gmane.org \
    --cc=alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org \
    --cc=hmurray-8cQiHa/C+6Go9G/jEpaUCQ@public.gmane.org \
    --cc=laurent.pinchart-AgBVmzD5pcezQB+pC5nmwQ@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=stevecalfee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.