* usb audio callback questions.
@ 2003-07-06 13:21 James Courtier-Dutton
2003-07-07 10:26 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: James Courtier-Dutton @ 2003-07-06 13:21 UTC (permalink / raw)
To: alsa-devel
I have a question regarding the callbacks in the usbaudio.c driver.
The callback is defined as: -
/*
* complete callback from data urb
*/
static void snd_complete_urb(struct urb *urb, struct pt_regs *regs)
The callback is set up with: -
u->urb->complete = snd_usb_complete_callback(snd_complete_urb);
The issue I have is that urb->complete is of type: -
struct urb;
typedef void (*usb_complete_t)(struct urb *);
struct urb
{
<snip>
usb_complete_t complete; // pointer to completion routine
<snip>
};
So, why is the "struct pt_regs *regs" there ?
I would think that
static void snd_complete_urb(struct urb *urb, struct pt_regs *regs)
should change to
static void snd_complete_urb(struct urb *urb)
Cheers
James
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: usb audio callback questions.
2003-07-06 13:21 usb audio callback questions James Courtier-Dutton
@ 2003-07-07 10:26 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2003-07-07 10:26 UTC (permalink / raw)
To: James Courtier-Dutton; +Cc: alsa-devel
At Sun, 06 Jul 2003 14:21:52 +0100,
James Courtier-Dutton wrote:
>
> I have a question regarding the callbacks in the usbaudio.c driver.
> The callback is defined as: -
>
> /*
> * complete callback from data urb
> */
> static void snd_complete_urb(struct urb *urb, struct pt_regs *regs)
>
>
> The callback is set up with: -
> u->urb->complete = snd_usb_complete_callback(snd_complete_urb);
>
> The issue I have is that urb->complete is of type: -
> struct urb;
> typedef void (*usb_complete_t)(struct urb *);
>
> struct urb
> {
> <snip>
> usb_complete_t complete; // pointer to completion routine
> <snip>
> };
>
> So, why is the "struct pt_regs *regs" there ?
> I would think that
> static void snd_complete_urb(struct urb *urb, struct pt_regs *regs)
> should change to
> static void snd_complete_urb(struct urb *urb)
the second argument is added in the 2.5 USB-driver stack.
we have a (rather complex) wrapper for that, to compile the same
source both for 2.4 and 2.5 (even 2.2) kernels.
yeah, it needs more clean up...
Takashi
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-07-07 10:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-07-06 13:21 usb audio callback questions James Courtier-Dutton
2003-07-07 10:26 ` Takashi Iwai
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.