linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [Alsa-devel] snd-usb-audio driver
@ 2005-05-09  7:41 Clemens Ladisch
  2005-05-10 21:43 ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Clemens Ladisch @ 2005-05-09  7:41 UTC (permalink / raw)
  To: linux-hotplug-devel; +Cc: alsa-devel

Greg KH wrote:
> On Fri, Apr 29, 2005 at 05:01:42PM -0400, David Zeuthen wrote:
> > On Fri, 2005-04-29 at 13:09 -0700, Greg KH wrote:
> > > You can do this, as you get two different hotplug events.  This is
> > > because usb drivers bind to the USB inteface, not the main device
> > > itself.
> >
> > As an unrelated note this is actually not true for snd-usb-audio driver
> >
> >         [davidz@daxter hal]$ ls -l /sys/class/sound/pcmC2D0c/
> >         total 0
> >         -r--r--r--  1 root root 4096 Apr 29 16:57 dev
> >         lrwxrwxrwx  1 root root    0 Apr 29 16:57 device ->
> > ../../../devices/pci0000:00/0000:00:1d.1/usb3/3-2
>
> This should point to the interface, not the device, you are correct.
>
> >         [davidz@daxter hal]$ tree /sys/bus/usb/drivers/snd-usb-audio/
> >         /sys/bus/usb/drivers/snd-usb-audio/
> >         |-- 3-2:1.0 -> ../../../../devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2:1.0
> >         |-- 3-2:1.1 -> ../../../../devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2:1.1
> >         |-- 3-2:1.2 -> ../../../../devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2:1.2
> >         `-- module -> ../../../../module/snd_usb_audio
> >
> > That"s a bug, right? Is this the right place to report it?
>
> Bug in the alsa driver, I suggest reporting it to them.  Should be a one
> line fix.

The ALSA framework currently has exactly one 'struct device' for all
devices of a sound card.  If we want to bind to the respectively
correct interface for each device we have to change more than one
line.

I'll make a temporary fix to bind to the first interface that is
probed.


Regards,
Clemens



-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r 
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Alsa-devel] snd-usb-audio driver
  2005-05-09  7:41 [Alsa-devel] snd-usb-audio driver Clemens Ladisch
@ 2005-05-10 21:43 ` Greg KH
  2005-05-11  7:37   ` Clemens Ladisch
  0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2005-05-10 21:43 UTC (permalink / raw)
  To: Clemens Ladisch; +Cc: linux-hotplug-devel, alsa-devel

On Mon, May 09, 2005 at 09:41:19AM +0200, Clemens Ladisch wrote:
> Greg KH wrote:
> > On Fri, Apr 29, 2005 at 05:01:42PM -0400, David Zeuthen wrote:
> > > On Fri, 2005-04-29 at 13:09 -0700, Greg KH wrote:
> > > > You can do this, as you get two different hotplug events.  This is
> > > > because usb drivers bind to the USB inteface, not the main device
> > > > itself.
> > >
> > > As an unrelated note this is actually not true for snd-usb-audio driver
> > >
> > >         [davidz@daxter hal]$ ls -l /sys/class/sound/pcmC2D0c/
> > >         total 0
> > >         -r--r--r--  1 root root 4096 Apr 29 16:57 dev
> > >         lrwxrwxrwx  1 root root    0 Apr 29 16:57 device ->
> > > ../../../devices/pci0000:00/0000:00:1d.1/usb3/3-2
> >
> > This should point to the interface, not the device, you are correct.
> >
> > >         [davidz@daxter hal]$ tree /sys/bus/usb/drivers/snd-usb-audio/
> > >         /sys/bus/usb/drivers/snd-usb-audio/
> > >         |-- 3-2:1.0 -> ../../../../devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2:1.0
> > >         |-- 3-2:1.1 -> ../../../../devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2:1.1
> > >         |-- 3-2:1.2 -> ../../../../devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2:1.2
> > >         `-- module -> ../../../../module/snd_usb_audio
> > >
> > > That"s a bug, right? Is this the right place to report it?
> >
> > Bug in the alsa driver, I suggest reporting it to them.  Should be a one
> > line fix.
> 
> The ALSA framework currently has exactly one 'struct device' for all
> devices of a sound card.  If we want to bind to the respectively
> correct interface for each device we have to change more than one
> line.
> 
> I'll make a temporary fix to bind to the first interface that is
> probed.

That will not work a usb speaker device that has the first interface as
the usb keyboard :)

Why not just point the struct device for ALSA at the struct
usb_interface that is passed to you?  That's the proper one to use.

thanks,

greg k-h


-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_ids93&alloc_id\x16281&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Alsa-devel] snd-usb-audio driver
  2005-05-10 21:43 ` Greg KH
@ 2005-05-11  7:37   ` Clemens Ladisch
  2005-05-11  7:41     ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Clemens Ladisch @ 2005-05-11  7:37 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-hotplug-devel, alsa-devel

Greg KH wrote:
> On Mon, May 09, 2005 at 09:41:19AM +0200, Clemens Ladisch wrote:
> > I'll make a temporary fix to bind to the first interface that is
> > probed.
>
> That will not work a usb speaker device that has the first interface as
> the usb keyboard :)
>
> Why not just point the struct device for ALSA at the struct
> usb_interface that is passed to you?

This is exactly what I actually meant when I said "probed".

Fixed now.


Regards,
Clemens



-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_ids93&alloc_id\x16281&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Alsa-devel] snd-usb-audio driver
  2005-05-11  7:37   ` Clemens Ladisch
@ 2005-05-11  7:41     ` Greg KH
  0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2005-05-11  7:41 UTC (permalink / raw)
  To: Clemens Ladisch; +Cc: linux-hotplug-devel, alsa-devel

On Wed, May 11, 2005 at 09:37:37AM +0200, Clemens Ladisch wrote:
> Greg KH wrote:
> > On Mon, May 09, 2005 at 09:41:19AM +0200, Clemens Ladisch wrote:
> > > I'll make a temporary fix to bind to the first interface that is
> > > probed.
> >
> > That will not work a usb speaker device that has the first interface as
> > the usb keyboard :)
> >
> > Why not just point the struct device for ALSA at the struct
> > usb_interface that is passed to you?
> 
> This is exactly what I actually meant when I said "probed".
> 
> Fixed now.

Ah, ok, sorry for the confusion.

greg k-h


-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_ids93&alloc_id\x16281&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-05-11  7:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-09  7:41 [Alsa-devel] snd-usb-audio driver Clemens Ladisch
2005-05-10 21:43 ` Greg KH
2005-05-11  7:37   ` Clemens Ladisch
2005-05-11  7:41     ` Greg KH

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).