alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Mack <zonque@gmail.com>
To: Clemens Ladisch <clemens@ladisch.de>
Cc: tiwai@suse.de, blablack@gmail.com, alsa-devel@alsa-project.org,
	gdiffey@gmail.com, linuxaudio@showlabor.de
Subject: Re: [PATCH 2/5] ALSA: snd-usb: switch over to new endpoint streaming logic
Date: Fri, 18 Nov 2011 15:41:56 +0100	[thread overview]
Message-ID: <4EC66EB4.8020906@gmail.com> (raw)
In-Reply-To: <4EB05D3A.60405@ladisch.de>

Hi Clemens and Takashi,

I'm back on working on (and hopefully finishing) this series now. One
question that remains is ...

On 11/01/2011 09:57 PM, Clemens Ladisch wrote:
> On 10/31/2011 01:10 PM, Daniel Mack wrote:
>> @@ -276,6 +312,15 @@ static int set_format(struct snd_usb_substream *subs, struct audioformat *fmt)
>>  	if (((is_playback && attr == USB_ENDPOINT_SYNC_ASYNC) ||
>>  	     (! is_playback && attr == USB_ENDPOINT_SYNC_ADAPTIVE)) &&
>>  	    altsd->bNumEndpoints >= 2) {
>> +		switch (subs->stream->chip->usb_id) {
>> +		case USB_ID(0x0763, 0x2080): /* M-Audio FastTrack Ultra */
>> +		case USB_ID(0x0763, 0x2081):
>> +			ep = 0x81;
>> +			iface = usb_ifnum_to_if(dev, 2);
>> +			alts = &iface->altsetting[1];
> 
> Better check that the device actually has these descriptors.
> 
>> +int snd_usb_substream_capture_trigger(struct snd_pcm_substream *substream, int cmd)
>> +{
>> +	case SNDRV_PCM_TRIGGER_START:
>> +		err = start_endpoints(subs);
> 
> The trigger callback should execute very quickly; the initial URB
> submission should be handled in the prepare callback.

This is actually the way the current implementation does it as well. And
there seems to be a reason why the inital submission of urbs is done
differently for the two directions. In the prepare callback, there's
also a comment that says

        /* for playback, submit the URBs now; otherwise, the first
hwptr_done
         * updates for all URBs would happen at the same time when
starting */
        if (subs->direction == SNDRV_PCM_STREAM_PLAYBACK) {
                subs->ops.prepare = prepare_nodata_playback_urb;
                return start_urbs(subs, runtime);
        }

I'm not sure whether my patch set should touch this implementation
detail for now.


Daniel

  parent reply	other threads:[~2011-11-18 14:42 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-31 12:10 [PATCH 0/5] RFC for snd-usb: rework usb endpoint logic Daniel Mack
2011-10-31 12:10 ` [PATCH 1/5] ALSA: snd-usb: implement new endpoint streaming model Daniel Mack
2011-11-01 20:57   ` Clemens Ladisch
2011-11-02  8:36     ` Daniel Mack
2011-11-02 10:26   ` Clemens Ladisch
2011-11-02 14:29     ` Daniel Mack
2011-11-02 15:49       ` Clemens Ladisch
2011-11-03 15:21         ` Daniel Mack
2011-11-03 16:42           ` Clemens Ladisch
2011-10-31 12:10 ` [PATCH 2/5] ALSA: snd-usb: switch over to new endpoint streaming logic Daniel Mack
2011-11-01 20:57   ` Clemens Ladisch
2011-11-02 15:58     ` Takashi Iwai
2011-11-02 16:18       ` Clemens Ladisch
2011-11-02 16:18         ` Takashi Iwai
2011-11-02 22:01       ` Torsten Schenk
2011-11-18 14:44         ` Daniel Mack
2011-11-18 14:41     ` Daniel Mack [this message]
2011-10-31 12:10 ` [PATCH 3/5] ALSA: snd-usb: remove old " Daniel Mack
2011-10-31 12:10 ` [PATCH 4/5] ALSA: snd-usb: set MAX_URBS to 16 Daniel Mack
2011-11-01 20:57   ` Clemens Ladisch
2011-10-31 12:10 ` [PATCH 5/5] ALSA: snd-usb: add support for implicit feedback Daniel Mack
2011-10-31 12:38 ` [PATCH 0/5] RFC for snd-usb: rework usb endpoint logic Daniel Mack
2011-11-01  8:50   ` Aurélien Leblond
2011-11-01  9:15     ` Daniel Mack
2011-11-01  9:40       ` Felix Homann
2011-11-01 10:25         ` Daniel Mack
2011-11-01 10:39           ` Felix Homann
2011-11-01 12:11             ` Daniel Mack
2011-11-01 13:59               ` Grant Diffey
2011-11-01 15:36               ` Takashi Iwai
2011-11-01 16:19   ` Takashi Iwai
2011-11-01 19:03     ` Felix Homann
2011-11-02  6:49       ` Takashi Iwai
2011-11-02  8:27     ` Daniel Mack

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=4EC66EB4.8020906@gmail.com \
    --to=zonque@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=blablack@gmail.com \
    --cc=clemens@ladisch.de \
    --cc=gdiffey@gmail.com \
    --cc=linuxaudio@showlabor.de \
    --cc=tiwai@suse.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).