|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
|
[PLUG] Linux and Device numbering?
|
I encountered a problem this week with my PC that took me a while to
solve.
I have heard that linux doesn't consistantly number devices (I remember
one rant by the cd-tools developer on how the SCSI devices seem to be
picked randomly, sr0 might be sr1 at the next boot, etc.).
When I put together this PC [about 2 months ago], I ditched the onboard
sound, in favor of a sound-blaster live with digital out for my MD
recorder. I also have a USB to SPDIF converter, and a TV card, which has
a mixer control.
Most programs seem to just use /dev/dsp.
While it might be possible to change the config of all of them, once I
figured out that /dev/dsp2 was my SBlive (and mixer1 was the mixer), I did
the following:
mv /dev/dsp /dev/dsp.orig
ln -s /dev/dsp2 /dev/dsp
mv /dev/mixer /dev/mixer.orig
ln -s /dev/mixer1 /dev/mixer
I know this isn't the perfect or "correct" solution, but it worked fine
for about 2 months with every audio app I can think of: esd, xmms, xine,
mplayer, aviplay, glame, mpg123, mp3blaster, you name it - even with
limewire.
On a related theme, when I set up my computer, I installed 3 CD-rom
drives, 1 SCSI CD-ROM (Toshiba?), 1 SCSI CD-RW (Yamaha), and an IDE
CD-ROM. I made /cdrom0, /cdrom1, and /cdrom2 - /cdrom0 was the IDE drive.
in my fstab is a line that says /dev/hdc is for /cdrom0, and another to
state that /dev/sr0 is for /cdrom1, and another to to mention that
/dev/sr1 is for /cdrom2.
Again, for two months this worked fine. I run debian testing, so I expect
things to change on my sometimes, but i havn't actually updated it for a
few weeks.
One of my friends wanted access to the sound, so I added him to the audio
group (and the video group too, while I was at it) in /etc/group.
He couldn't get it to work, even after logging out and back in, and even
though "groups" from his account clearly showed "audio" in the list. I
made sure that the /dev/dsp* and dev/mixer* were in the audio group and
that they had G+RW (I think they are mode 660?). Everything was
well. Not knowing what the next step should be, I rebooted the machine
(which had been up about 20 days, give or take). It still didn't work.
I told him I didn't have time and forgot about it. Then I go home, and
log in, and the sound doesn't work for ME. Remember the only thing I
changed was to add my friend's account to the audio group. Dumbfounded, I
edited the /etc/group again and removed him, wondering how that could
possibly have caused a problem. Of course it didn't help. I tripple
checked all the permissions, and tried getting audio to work under
single-user mode as root from the console. Still nothing.
I manually unloaded all the related modules and re-loaded them, noting
that emu10k1 DID in fact load properly and detect the sound-card, but i
was still confused when mpg123 said something like "libaou - Can't open
sound device - is device in use?".
I was starting to go on the theory that my SBlive had fried and I would
need to shell out another $25 for a new one. Then I asked my friend to
take a look at it, knowing that he would somehow solve the problem in 2
minutes, making an idiot of me.
It turns out that Suddenly the SBLive is assigned to /dev/dsp (or actually
/dev/dsp.orig in this case). This is with no krnl changes, and no
hardware changes. It just up and decided that it was going to re-assign
the device numbers. This is fine and dandy, I just deleted the sym link
and renamed the /dev/dsp.orig back to it's original name, but I wonder how
long until it changes again?
Well fine I thought, problem solved, and proceded to pop in a CD a friend
had loaned me.. right-clicked in nautilus' desktop and selected "disks -
cdrom0"... beep! "Couldn't mount /cdrom0" - huh? "buggy nautilus", I
thought, and went to the console:
mount /cdrom0
<error>
sudo mount /cdrom0
<error>
cat /etc/fstab
(looks right)
cat /proc/hdc/*
(looks right, hdc is a CD-rom drive).
(confusion ensues)
...
Turns out that mount no longer will accept IDE devices? If I use /dev/sr2
with the SCSI emulation, it works.
Again, I didn't change the config here, the SCSI emulation has been on all
along... Why the sudden change? MAYBE I updated my mount utilities
because of ext3.
I just posted this because I wondered if anyone else has encountered this
problem.
-- noah silva
______________________________________________________________________
Philadelphia Linux Users Group - http://www.phillylinux.org
Announcements-http://lists.phillylinux.org/mail/listinfo/plug-announce
General Discussion - http://lists.phillylinux.org/mail/listinfo/plug
|
|