linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Hotplug loads USB audio before local audio
@ 2003-04-30 18:24 Joshua Pollak
  2003-04-30 18:31 ` Greg KH
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: Joshua Pollak @ 2003-04-30 18:24 UTC (permalink / raw)
  To: linux-hotplug

Hello,

I have a built in emu10k1 audio devices in my computer and a USB quickcam
with a microphone. It seems the modules for the USB quickcam are loaded via 
Hotplug before the module for the emu10k1 module is loaded. This is on RedHat 
9.0 BTW.

When I boot my computer with the Quickcam connected, the usb audio module 
loads before the emu10k1 module, so the Quickcam gets the /dev/mixer, etc, 
devices. The sound card gets the /dev/mixer1, etc,
devices.

When I boot with the camera unplugged, the soundcard is /dev/mixer, etc, and
then I can plug in the camera and get them to be /dev/mixer1, etc.

Short of hacking the system's boot process up, is there a way to ensure that
the emu10k1 sound card will always be connected to the primary /dev/mixer
devices, while the USB ones will be on the secondary ones?

-- 
Joshua Pollak             617-491-3474 x586
Software Engineer             joshp@cra.com
Charles River Analytics


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
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] 12+ messages in thread

* Re: Hotplug loads USB audio before local audio
  2003-04-30 18:24 Hotplug loads USB audio before local audio Joshua Pollak
@ 2003-04-30 18:31 ` Greg KH
  2003-04-30 18:32 ` Joshua Pollak
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Greg KH @ 2003-04-30 18:31 UTC (permalink / raw)
  To: linux-hotplug

On Wed, Apr 30, 2003 at 02:24:21PM -0400, Joshua Pollak wrote:
> 
> Short of hacking the system's boot process up, is there a way to ensure that
> the emu10k1 sound card will always be connected to the primary /dev/mixer
> devices, while the USB ones will be on the secondary ones?

On 2.4 right now, no, sorry.

For 2.5 I'm working on something that will let you do this, called udev.
Search the archives of this list, or lkml for some pointers to the
project (hint, it will not solve your problem yet, but hopefully in the
near future.)

thanks,

greg k-h


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
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] 12+ messages in thread

* Re: Hotplug loads USB audio before local audio
  2003-04-30 18:24 Hotplug loads USB audio before local audio Joshua Pollak
  2003-04-30 18:31 ` Greg KH
@ 2003-04-30 18:32 ` Joshua Pollak
  2003-04-30 18:33 ` Bill Nottingham
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Joshua Pollak @ 2003-04-30 18:32 UTC (permalink / raw)
  To: linux-hotplug

Ok, thanks, I guess I'll just have to wait.

On Wednesday 30 April 2003 02:31 pm, Greg KH wrote:
> On Wed, Apr 30, 2003 at 02:24:21PM -0400, Joshua Pollak wrote:
> > Short of hacking the system's boot process up, is there a way to ensure
> > that the emu10k1 sound card will always be connected to the primary
> > /dev/mixer devices, while the USB ones will be on the secondary ones?
>
> On 2.4 right now, no, sorry.
>
> For 2.5 I'm working on something that will let you do this, called udev.
> Search the archives of this list, or lkml for some pointers to the
> project (hint, it will not solve your problem yet, but hopefully in the
> near future.)
>
> thanks,
>
> greg k-h

-- 
Joshua Pollak             617-491-3474 x586
Software Engineer             joshp@cra.com
Charles River Analytics


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
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] 12+ messages in thread

* Re: Hotplug loads USB audio before local audio
  2003-04-30 18:24 Hotplug loads USB audio before local audio Joshua Pollak
  2003-04-30 18:31 ` Greg KH
  2003-04-30 18:32 ` Joshua Pollak
@ 2003-04-30 18:33 ` Bill Nottingham
  2003-04-30 18:46 ` Joshua Pollak
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Bill Nottingham @ 2003-04-30 18:33 UTC (permalink / raw)
  To: linux-hotplug

Greg KH (greg@kroah.com) said: 
> > Short of hacking the system's boot process up, is there a way to ensure that
> > the emu10k1 sound card will always be connected to the primary /dev/mixer
> > devices, while the USB ones will be on the secondary ones?
> 
> On 2.4 right now, no, sorry.

Hacks you can do:

- build emu10k1 statically
- 'alias audio off' in /etc/modules.conf (this will make USB not load
  at all, though.)
- and, as you said, hack something in initscripts to load emu10k1 for
  you first.

None of these are that great, of course.

Bill


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
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] 12+ messages in thread

* Re: Hotplug loads USB audio before local audio
  2003-04-30 18:24 Hotplug loads USB audio before local audio Joshua Pollak
                   ` (2 preceding siblings ...)
  2003-04-30 18:33 ` Bill Nottingham
@ 2003-04-30 18:46 ` Joshua Pollak
  2003-04-30 19:02 ` Pedro Lopez-Cabanillas
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Joshua Pollak @ 2003-04-30 18:46 UTC (permalink / raw)
  To: linux-hotplug

Thanks for the suggestions and the quick responses, some devel mailinglists 
just ignore user requests. ;)

I'm trying to avoid recompiling the Kernel, just 'cause we'll have to do the 
same on three or four different machines, and I want to keep the process 
simple. Same for hacking the config scripts. We don't need the audio portion 
of the camera though, so I guess we'll do 'alias audio off'. It would be nice 
to have, but its not important enough to get down and dirty with the system.

Thanks again, I didn't expect a solution so quickly.

On Wednesday 30 April 2003 02:33 pm, Bill Nottingham wrote:
> Greg KH (greg@kroah.com) said:
> > > Short of hacking the system's boot process up, is there a way to ensure
> > > that the emu10k1 sound card will always be connected to the primary
> > > /dev/mixer devices, while the USB ones will be on the secondary ones?
> >
> > On 2.4 right now, no, sorry.
>
> Hacks you can do:
>
> - build emu10k1 statically
> - 'alias audio off' in /etc/modules.conf (this will make USB not load
>   at all, though.)
> - and, as you said, hack something in initscripts to load emu10k1 for
>   you first.
>
> None of these are that great, of course.
>
> Bill

-- 
Joshua Pollak             617-491-3474 x586
Software Engineer             joshp@cra.com
Charles River Analytics


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
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] 12+ messages in thread

* Re: Hotplug loads USB audio before local audio
  2003-04-30 18:24 Hotplug loads USB audio before local audio Joshua Pollak
                   ` (3 preceding siblings ...)
  2003-04-30 18:46 ` Joshua Pollak
@ 2003-04-30 19:02 ` Pedro Lopez-Cabanillas
  2003-05-01  6:14 ` Christian Zoz
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Pedro Lopez-Cabanillas @ 2003-04-30 19:02 UTC (permalink / raw)
  To: linux-hotplug

On Wednesday 30 April 2003 20:24, Joshua Pollak wrote:
> Short of hacking the system's boot process up, is there a way to ensure
> that the emu10k1 sound card will always be connected to the primary
> /dev/mixer devices, while the USB ones will be on the secondary ones?

Another trick can be to include 'audio' in your '/etc/hotplug/blacklist' file. 
Add only the word 'audio' without '.o' in an empty line. This will prevent 
hotplug to load this module. You can do it later, by hand, with 'modprobe 
audio'.

Regards,
Pedro

-- 
ALSA Library Bindings for Pascal
http://alsapas.alturl.com



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
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] 12+ messages in thread

* Re: Hotplug loads USB audio before local audio
  2003-04-30 18:24 Hotplug loads USB audio before local audio Joshua Pollak
                   ` (4 preceding siblings ...)
  2003-04-30 19:02 ` Pedro Lopez-Cabanillas
@ 2003-05-01  6:14 ` Christian Zoz
  2003-05-01 15:32 ` Joshua Pollak
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Christian Zoz @ 2003-05-01  6:14 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 959 bytes --]

On Wed, Apr 30, Pedro Lopez-Cabanillas wrote:
> On Wednesday 30 April 2003 20:24, Joshua Pollak wrote:
> > Short of hacking the system's boot process up, is there a way to ensure
> > that the emu10k1 sound card will always be connected to the primary
> > /dev/mixer devices, while the USB ones will be on the secondary ones?
> 
> Another trick can be to include 'audio' in your '/etc/hotplug/blacklist' file. 
> Add only the word 'audio' without '.o' in an empty line. This will prevent 
> hotplug to load this module. You can do it later, by hand, with 'modprobe 
> audio'.

Yes, this works well. We solved that this way. Have a look at the
attached files.


-- 

ciao, christian

  --------------------------------------------------------------------
    Verglichen mit jedem x-beliebigen Redmonder Betriebssystem-Clone
    ist Linux geradezu eine leuchtende Perle der Datensicherheit.
  ------ Frank Rennemann (http://www.linux-knowledge-portal.org) -----

[-- Attachment #2: blacklist --]
[-- Type: text/plain, Size: 1068 bytes --]

#
# Listing a module here prevents the hotplug scripts from loading it.
# Usually that'd be so that some other driver will bind it instead,
# no matter which driver happens to get probed first.  Sometimes user
# mode tools can also control driver binding.
#
# Syntax:  driver name alone (without any spaces) on a line. Other
# lines are ignored.
#

# uhci ... usb-uhci handles the same pci class
usb-uhci

# tulip ... de4x5, xircom_tulip_cb, dmfe (...) handle same devices
de4x5
# At least 2.4.3 and later xircom_tulip doesn't have that conflict
# xircom_tulip_cb
dmfe

# Modules for sound devices will be loaded by the alsasound script in
# /etc/hotplug/usb/. They should not be loaded before rcalsasound has started.
audio
snd-usb-audio
usb-midi

# 8139cp.o is listed only once in modules.pcimap. And for exactly this device
# there is also an entry with 8139too. I have one bugreport that 8139cp does
# not work for this card, therefore i add it to the blacklist.
8139cp

# ISDN USB is handled via /etc/hotplug/usb/ISDN.usermap
fcusb
fcusb2
fxusb
fxusb_CZ
fcdslusb

[-- Attachment #3: alsasound.usermap --]
[-- Type: text/plain, Size: 9589 bytes --]

# module             match_flags idVendor idProduct bcdDevice_lo bcdDevice_hi bDeviceClass bDeviceSubClass bDeviceProtocol bInterfaceClass bInterfaceSubClass bInterfaceProtocol driver_info
alsasound            0x0003      0x0499   0x1000    0x0000       0x0000       0x00         0x00            0x00            0x00            0x00               0x00               0x00008928
alsasound            0x0003      0x0499   0x1001    0x0000       0x0000       0x00         0x00            0x00            0x00            0x00               0x00               0x00008938
alsasound            0x0003      0x0499   0x1002    0x0000       0x0000       0x00         0x00            0x00            0x00            0x00               0x00               0x00008948
alsasound            0x0003      0x0499   0x1003    0x0000       0x0000       0x00         0x00            0x00            0x00            0x00               0x00               0x00008958
alsasound            0x0083      0x0499   0x1004    0x0000       0x0000       0x00         0x00            0x00            0xff            0x00               0x00               0x00008968
alsasound            0x0003      0x0499   0x1005    0x0000       0x0000       0x00         0x00            0x00            0x00            0x00               0x00               0x00008978
alsasound            0x0003      0x0499   0x1006    0x0000       0x0000       0x00         0x00            0x00            0x00            0x00               0x00               0x00008988
alsasound            0x0003      0x0499   0x1007    0x0000       0x0000       0x00         0x00            0x00            0x00            0x00               0x00               0x00008998
alsasound            0x0003      0x0499   0x1008    0x0000       0x0000       0x00         0x00            0x00            0x00            0x00               0x00               0x000089a8
alsasound            0x0003      0x0499   0x1009    0x0000       0x0000       0x00         0x00            0x00            0x00            0x00               0x00               0x000089b8
alsasound            0x0083      0x0499   0x100a    0x0000       0x0000       0x00         0x00            0x00            0xff            0x00               0x00               0x000089c8
alsasound            0x0003      0x0499   0x100e    0x0000       0x0000       0x00         0x00            0x00            0x00            0x00               0x00               0x000089d8
alsasound            0x0003      0x0499   0x100f    0x0000       0x0000       0x00         0x00            0x00            0x00            0x00               0x00               0x000089e8
alsasound            0x0003      0x0499   0x1010    0x0000       0x0000       0x00         0x00            0x00            0x00            0x00               0x00               0x000089f8
alsasound            0x0003      0x0499   0x1011    0x0000       0x0000       0x00         0x00            0x00            0x00            0x00               0x00               0x00008a08
alsasound            0x0003      0x0499   0x1012    0x0000       0x0000       0x00         0x00            0x00            0x00            0x00               0x00               0x00008a18
alsasound            0x0003      0x0499   0x1013    0x0000       0x0000       0x00         0x00            0x00            0x00            0x00               0x00               0x00008a28
alsasound            0x0003      0x0499   0x1014    0x0000       0x0000       0x00         0x00            0x00            0x00            0x00               0x00               0x00008a38
alsasound            0x0003      0x0499   0x5002    0x0000       0x0000       0x00         0x00            0x00            0x00            0x00               0x00               0x00008a48
alsasound            0x0003      0x0499   0x5003    0x0000       0x0000       0x00         0x00            0x00            0x00            0x00               0x00               0x00008a58
alsasound            0x0003      0x0499   0x5004    0x0000       0x0000       0x00         0x00            0x00            0x00            0x00               0x00               0x00008a68
alsasound            0x0003      0x0582   0x0000    0x0000       0x0000       0x00         0x00            0x00            0x00            0x00               0x00               0x00008a78
alsasound            0x0003      0x0582   0x0002    0x0000       0x0000       0x00         0x00            0x00            0x00            0x00               0x00               0x00008a88
alsasound            0x0003      0x0582   0x0003    0x0000       0x0000       0x00         0x00            0x00            0x00            0x00               0x00               0x00008a98
alsasound            0x0003      0x0582   0x0004    0x0000       0x0000       0x00         0x00            0x00            0x00            0x00               0x00               0x00008aa8
alsasound            0x0003      0x0582   0x0005    0x0000       0x0000       0x00         0x00            0x00            0x00            0x00               0x00               0x00008ab8
alsasound            0x0003      0x0582   0x0007    0x0000       0x0000       0x00         0x00            0x00            0x00            0x00               0x00               0x00008ac8
alsasound            0x0003      0x0582   0x0008    0x0000       0x0000       0x00         0x00            0x00            0x00            0x00               0x00               0x00008ad8
alsasound            0x0003      0x0582   0x0009    0x0000       0x0000       0x00         0x00            0x00            0x00            0x00               0x00               0x00008ae8
alsasound            0x0003      0x0582   0x000b    0x0000       0x0000       0x00         0x00            0x00            0x00            0x00               0x00               0x00008af8
alsasound            0x0003      0x0582   0x000c    0x0000       0x0000       0x00         0x00            0x00            0x00            0x00               0x00               0x00008b08
alsasound            0x0003      0x0582   0x0012    0x0000       0x0000       0x00         0x00            0x00            0x00            0x00               0x00               0x00008b18
alsasound            0x0003      0x0582   0x0014    0x0000       0x0000       0x00         0x00            0x00            0x00            0x00               0x00               0x00008b28
alsasound            0x0003      0x0582   0x0016    0x0000       0x0000       0x00         0x00            0x00            0x00            0x00               0x00               0x00008b38
alsasound            0x0003      0x0582   0x0023    0x0000       0x0000       0x00         0x00            0x00            0x00            0x00               0x00               0x00008b48
alsasound            0x0083      0x0582   0x0025    0x0000       0x0000       0x00         0x00            0x00            0xff            0x00               0x00               0x00008b58
alsasound            0x0003      0x0582   0x0027    0x0000       0x0000       0x00         0x00            0x00            0x00            0x00               0x00               0x00008b68
alsasound            0x0003      0x0582   0x0029    0x0000       0x0000       0x00         0x00            0x00            0x00            0x00               0x00               0x00008b78
alsasound            0x0083      0x0582   0x002b    0x0000       0x0000       0x00         0x00            0x00            0xff            0x00               0x00               0x00008b88
alsasound            0x0003      0x0582   0x002d    0x0000       0x0000       0x00         0x00            0x00            0x00            0x00               0x00               0x00008b98
alsasound            0x0003      0x0582   0x0033    0x0000       0x0000       0x00         0x00            0x00            0x00            0x00               0x00               0x00008ba8
alsasound            0x0083      0x0763   0x1002    0x0000       0x0000       0x00         0x00            0x00            0xff            0x00               0x00               0x00008bb8
alsasound            0x0083      0x0763   0x1011    0x0000       0x0000       0x00         0x00            0x00            0xff            0x00               0x00               0x00008bc8
alsasound            0x0083      0x0763   0x1015    0x0000       0x0000       0x00         0x00            0x00            0xff            0x00               0x00               0x00008bd8
alsasound            0x0083      0x0763   0x1021    0x0000       0x0000       0x00         0x00            0x00            0xff            0x00               0x00               0x00008be8
alsasound            0x0083      0x0763   0x1033    0x0000       0x0000       0x00         0x00            0x00            0xff            0x00               0x00               0x00008bf8
alsasound            0x0083      0x0763   0x1041    0x0000       0x0000       0x00         0x00            0x00            0xff            0x00               0x00               0x00008c08
alsasound            0x0083      0x0763   0x2001    0x0000       0x0000       0x00         0x00            0x00            0xff            0x00               0x00               0x00008c18
alsasound            0x0083      0x0763   0x2003    0x0000       0x0000       0x00         0x00            0x00            0xff            0x00               0x00               0x00008c28
alsasound            0x0180      0x0000   0x0000    0x0000       0x0000       0x00         0x00            0x00            0x01            0x01               0x00               0x00000000

[-- Attachment #4: alsasound --]
[-- Type: text/plain, Size: 512 bytes --]

#!/bin/bash
#
# /etc/hotplug/usb/alsasound
#
# Sets up newly plugged in USB audio/MIDI devices.
#

function add_alsa () {
    # check alsa is already running
    if [ ! -d /proc/asound ]; then
	# start alsasound script, so that static devices are properly loaded
	echo "Starting ALSA..."
	/etc/init.d/alsasound start >/dev/null 2>&1
    fi
    /sbin/modprobe snd-usb-audio
}

function remove_alsa () {
    /sbin/modprobe -r snd-usb-audio
}

case "$ACTION" in
add)
  add_alsa
  ;;
remove)
  remove_alsa
  ;;
esac

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

* Re: Hotplug loads USB audio before local audio
  2003-04-30 18:24 Hotplug loads USB audio before local audio Joshua Pollak
                   ` (5 preceding siblings ...)
  2003-05-01  6:14 ` Christian Zoz
@ 2003-05-01 15:32 ` Joshua Pollak
  2003-05-01 15:38 ` David Brownell
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Joshua Pollak @ 2003-05-01 15:32 UTC (permalink / raw)
  To: linux-hotplug

On Thursday 01 May 2003 11:38 am, David Brownell wrote:
> Christian Zoz wrote:
> > On Wed, Apr 30, Pedro Lopez-Cabanillas wrote:
> >>Another trick can be to include 'audio' in your '/etc/hotplug/blacklist'
> >> file. Add only the word 'audio' without '.o' in an empty line. This will
> >> prevent hotplug to load this module. You can do it later, by hand, with
> >> 'modprobe audio'.
> >
> > Yes, this works well. We solved that this way. Have a look at the
> > attached files.
>
> Are you suggesting that the hotplug distro should include those
> files?  If this particular ALSA setup problem is common, likely
> it should ...

Just to clarify, this problem is not particular to ALSA. I don't believe 
RedHat 9.0 uses ALSA, I think the driver that is being loaded is the stock 
Linux kernel one.

-- 
Joshua Pollak             617-491-3474 x586
Software Engineer             joshp@cra.com
Charles River Analytics


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
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] 12+ messages in thread

* Re: Hotplug loads USB audio before local audio
  2003-04-30 18:24 Hotplug loads USB audio before local audio Joshua Pollak
                   ` (6 preceding siblings ...)
  2003-05-01 15:32 ` Joshua Pollak
@ 2003-05-01 15:38 ` David Brownell
  2003-05-01 18:57 ` Pedro Lopez-Cabanillas
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: David Brownell @ 2003-05-01 15:38 UTC (permalink / raw)
  To: linux-hotplug

Christian Zoz wrote:
> On Wed, Apr 30, Pedro Lopez-Cabanillas wrote:
> 
>>Another trick can be to include 'audio' in your '/etc/hotplug/blacklist' file. 
>>Add only the word 'audio' without '.o' in an empty line. This will prevent 
>>hotplug to load this module. You can do it later, by hand, with 'modprobe 
>>audio'.
> 
> 
> Yes, this works well. We solved that this way. Have a look at the
> attached files.

Are you suggesting that the hotplug distro should include those
files?  If this particular ALSA setup problem is common, likely
it should ...

- Dave





-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
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] 12+ messages in thread

* Re: Hotplug loads USB audio before local audio
  2003-04-30 18:24 Hotplug loads USB audio before local audio Joshua Pollak
                   ` (7 preceding siblings ...)
  2003-05-01 15:38 ` David Brownell
@ 2003-05-01 18:57 ` Pedro Lopez-Cabanillas
  2003-05-02  5:06 ` Christian Zoz
  2003-05-02  7:24 ` Oliver Neukum
  10 siblings, 0 replies; 12+ messages in thread
From: Pedro Lopez-Cabanillas @ 2003-05-01 18:57 UTC (permalink / raw)
  To: linux-hotplug

On Thursday 01 May 2003 17:32, Joshua Pollak wrote:
> Just to clarify, this problem is not particular to ALSA. I don't believe
> RedHat 9.0 uses ALSA, I think the driver that is being loaded is the stock
> Linux kernel one.

Yes, 'audio' is the OSS module for USB audio devices. OTOH, i think that your 
problem is not particular to audio, OSS or ALSA. The problem is that you have 
two devices of the same class, one of them supported by hotplug (or both).

For instance: if you get some internal PCI TV card using a V4L driver (as 
bt878), and you have also an USB webcam... How can you know which is your 
webcam /dev/video0 or /dev/video1 ? if you boot with your USB cam plugged, 
then it is /dev/video0, but if you boot with it unplugged the node  
/dev/video0 is your TV card, and /dev/video1 will be the webcam if you plug  
it later. Same for printers, scanners, disks (i guess).

If you have several USB devices of the same class, you can also go into 
troubles with your apps configured to use one device or another, by his 
device node in /dev directory. ALSA driver snd-usb-audio has some support to 
solve this issue, with two params to specify the device order by manufacturer 
and model ids, but i don't know about other drivers.

Of course, you can avoid to use hotplug to load your device driver  
(/etc/hotplug/blacklist) or renounce to use it (alias off in modules.conf). 
The SuSE approach gives you some hotplug support, loading the drivers with 
the classic ALSA startup script. The problem is that you need to maintain the 
alsa.usermap file by hand as the set of devices supported by the 
snd-usb-audio driver grows (and it grows very quickly!).  Planet CCRMA 
(stanford.edu) has a set of RPM packages for multimedia Red Hat users, using 
/etc/hotplug/blacklist for audio, too.

David: I think that some kind of general solution for this problem should be  
included in hotplug (if there is one).

Regards,
Pedro

-- 
ALSA Library Bindings for Pascal
http://alsapas.alturl.com



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
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] 12+ messages in thread

* Re: Hotplug loads USB audio before local audio
  2003-04-30 18:24 Hotplug loads USB audio before local audio Joshua Pollak
                   ` (8 preceding siblings ...)
  2003-05-01 18:57 ` Pedro Lopez-Cabanillas
@ 2003-05-02  5:06 ` Christian Zoz
  2003-05-02  7:24 ` Oliver Neukum
  10 siblings, 0 replies; 12+ messages in thread
From: Christian Zoz @ 2003-05-02  5:06 UTC (permalink / raw)
  To: linux-hotplug

On Thu, May 01, Pedro Lopez-Cabanillas wrote:
> On Thursday 01 May 2003 17:32, Joshua Pollak wrote:
> > Just to clarify, this problem is not particular to ALSA. I don't believe
> > RedHat 9.0 uses ALSA, I think the driver that is being loaded is the stock
> > Linux kernel one.

Yes, then modify the scripts accordingly.

> Yes, 'audio' is the OSS module for USB audio devices. OTOH, i think that your 
> problem is not particular to audio, OSS or ALSA. The problem is that you have 
> two devices of the same class, one of them supported by hotplug (or both).
> 
> For instance: if you get some internal PCI TV card using a V4L driver (as 
> bt878), and you have also an USB webcam... How can you know which is your 
> webcam /dev/video0 or /dev/video1 ? if you boot with your USB cam plugged, 
> then it is /dev/video0, but if you boot with it unplugged the node  
> /dev/video0 is your TV card, and /dev/video1 will be the webcam if you plug  
> it later. Same for printers, scanners, disks (i guess).
> 
> If you have several USB devices of the same class, you can also go into 
> troubles with your apps configured to use one device or another, by his 
> device node in /dev directory. ALSA driver snd-usb-audio has some support to 
> solve this issue, with two params to specify the device order by manufacturer 
> and model ids, but i don't know about other drivers.
> 
> Of course, you can avoid to use hotplug to load your device driver  
> (/etc/hotplug/blacklist) or renounce to use it (alias off in modules.conf). 
> The SuSE approach gives you some hotplug support, loading the drivers with 
> the classic ALSA startup script. The problem is that you need to maintain the 
> alsa.usermap file by hand as the set of devices supported by the 

Yes that's the problem. It's a kind of 'works for most users'
solution.

> snd-usb-audio driver grows (and it grows very quickly!).  Planet CCRMA 
> (stanford.edu) has a set of RPM packages for multimedia Red Hat users, using 
> /etc/hotplug/blacklist for audio, too.
> 
> David: I think that some kind of general solution for this problem should be  
> included in hotplug (if there is one).

For 2.4 kernel:
It would be best, if all services that initialize builtin hardware,
would run before USB, PCMCIA, Firewire is started. Then you always get
the same device names for this builtin hardware.
In SuSE Linux we start e.g. network before hotplug and pcmcia. But
e.g. alsa reads files from /usr/..., which may be mounted via network.
And network may be provided by pcmcia/hotplug (But this is a rare
case). So alsa starts later and therefore needs the blacklist solution.

For 2.6 this problem will hopefully solved with persistent interface
names.

-- 

ciao, christian

  --------------------------------------------------------------------
    Verglichen mit jedem x-beliebigen Redmonder Betriebssystem-Clone
    ist Linux geradezu eine leuchtende Perle der Datensicherheit.
  ------ Frank Rennemann (http://www.linux-knowledge-portal.org) -----


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
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] 12+ messages in thread

* Re: Hotplug loads USB audio before local audio
  2003-04-30 18:24 Hotplug loads USB audio before local audio Joshua Pollak
                   ` (9 preceding siblings ...)
  2003-05-02  5:06 ` Christian Zoz
@ 2003-05-02  7:24 ` Oliver Neukum
  10 siblings, 0 replies; 12+ messages in thread
From: Oliver Neukum @ 2003-05-02  7:24 UTC (permalink / raw)
  To: linux-hotplug

Am Mittwoch, 30. April 2003 20:24 schrieb Joshua Pollak:
> Hello,
>
> I have a built in emu10k1 audio devices in my computer and a USB quickcam
> with a microphone. It seems the modules for the USB quickcam are loaded via
> Hotplug before the module for the emu10k1 module is loaded. This is on
> RedHat 9.0 BTW.
>
> When I boot my computer with the Quickcam connected, the usb audio module
> loads before the emu10k1 module, so the Quickcam gets the /dev/mixer, etc,
> devices. The sound card gets the /dev/mixer1, etc,
> devices.

On 2.4 use the preload and postload feature in /etc/modules.conf to always load
both drivers in desired order. There is no generic solution, however.

	Regards
		Oliver



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
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] 12+ messages in thread

end of thread, other threads:[~2003-05-02  7:24 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-30 18:24 Hotplug loads USB audio before local audio Joshua Pollak
2003-04-30 18:31 ` Greg KH
2003-04-30 18:32 ` Joshua Pollak
2003-04-30 18:33 ` Bill Nottingham
2003-04-30 18:46 ` Joshua Pollak
2003-04-30 19:02 ` Pedro Lopez-Cabanillas
2003-05-01  6:14 ` Christian Zoz
2003-05-01 15:32 ` Joshua Pollak
2003-05-01 15:38 ` David Brownell
2003-05-01 18:57 ` Pedro Lopez-Cabanillas
2003-05-02  5:06 ` Christian Zoz
2003-05-02  7:24 ` Oliver Neukum

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