LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   how to reinitialize /dev/dsp (https://www.linuxquestions.org/questions/linux-hardware-18/how-to-reinitialize-dev-dsp-259443/)

ankur_linuxfan 11-26-2004 04:09 AM

how to reinitialize /dev/dsp
 
i want to reinitialize /dev/dsp as well as /dev/mixer........
why i want to do it is that i accidentally removed /dev/dsp and /dev/mixer.
now i want to get my /dev/dsp and /dev/mixer back......what should i do?????

i tried the following commands to get them back.......

mknod /dev/dsp c 121 2
mknod /dev/dsp c 121 3
chmod 777 /dev/dsp
chmod 777 /dev/mixer

But , whenever i try to access /dev/dsp i get the following error "/dev/dsp : no such device or address"

that's why whenever i try to open aumix , it says "error opening mixer"

plzzzzzzzzzz help!!!!!

rjlee 11-26-2004 04:46 AM

You have created the device files on the disk (/dev/dsp and /dev/mixer). When you try to access these files, the kernel will map the file I/O requests on to the appropriate device driver (kernel module) to handle it.

The problem here is that the device driver can't be found. What you need to do is load the appropriate module to handle these devices, which depends on your sound card.
Code:

modprobe audio
is likely to be a good start, but you may need to go through your /lib/modules/ directory and pick out the appropriate module from the list.

If you have problems when loading the modules, then you will need to know about
Code:

lsmod | less
which lists the modules that you have loaded (q to exit), and the file
Code:

/var/log/messages
which is where error messages get sent.

ankur_linuxfan 11-26-2004 05:46 AM

thanks for your reply......
i tried what u wrote in your reply. But , it still didn't work. I still get the same error "/dev/dsp : no such device or address"
i logged on as root . I ran "modprobe audio" and it gave no error. I checked the /var/log/messages for errors. There were no errors.
Then i tried lsmod to check for loaded modules. I got the following output.... Can u figure out anything from the output

Module Size Used by
audio 36612 0
snd_pcm_oss 40740 0
snd_mixer_oss 13824 1 snd_pcm_oss
snd_intel8x0 26280 2
snd_ac97_codec 50436 1 snd_intel8x0
snd_pcm 68872 2 snd_pcm_oss,snd_intel8x0
snd_timer 17156 1 snd_pcm
snd_page_alloc 7940 2 snd_intel8x0,snd_pcm
gameport 3328 1 snd_intel8x0
snd_mpu401_uart 4864 1 snd_intel8x0
snd_rawmidi 17184 1 snd_mpu401_uart
snd_seq_device 6152 1 snd_rawmidi
snd 38372 13 snd_pcm_oss,snd_mixer_oss,snd_intel8x0,snd_ac97_codec,snd_pcm,snd_timer,snd_mpu401_uart,snd_rawmidi, snd_seq_device
soundcore 6112 2 audio,snd
parport_pc 19392 1
lp 8236 0
parport 29640 2 parport_pc,lp
autofs4 10624 0
rfcomm 27164 0
l2cap 16004 5 rfcomm
bluetooth 33636 4 rfcomm,l2cap
sunrpc 101064 1
8139too 17792 0
mii 3584 1 8139too
ipt_REJECT 4736 1
ipt_state 1536 7
ip_conntrack 24968 1 ipt_state
iptable_filter 2048 1
ip_tables 13440 3 ipt_REJECT,ipt_state,iptable_filter
floppy 47440 0
sg 27552 0
microcode 4768 0
ntfs 81516 1
nls_utf8 1536 3
nls_cp437 5376 2
vfat 10496 2
fat 33472 1 vfat
dm_mod 33184 0
uhci_hcd 23708 0
ehci_hcd 21896 0
button 4504 0
battery 6924 0
asus_acpi 8472 0
ac 3340 0
i830 55856 2
ipv6 184288 8
ext3 102376 2
jbd 40216 1 ext3
ata_piix 5380 0
libata 29312 1 ata_piix,[permanent]
sd_mod 16384 0
scsi_mod 91344 3 sg,libata,sd_mod

I also checked for devices through the lspci command....... i got the following output

00:00.0 Host bridge: Intel Corp. 82865G/PE/P DRAM Controller/Host-Hub Interface (rev 02)
00:02.0 VGA compatible controller: Intel Corp. 82865G Integrated Graphics Device (rev 02)
00:1d.0 USB Controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB UHCI #1 (rev 02)
00:1d.1 USB Controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB UHCI #2 (rev 02)
00:1d.2 USB Controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB UHCI #3 (rev 02)
00:1d.3 USB Controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB UHCI #4 (rev 02)
00:1d.7 USB Controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) USB2 EHCI Controller (rev 02)
00:1e.0 PCI bridge: Intel Corp. 82801BA/CA/DB/EB/ER Hub interface to PCI Bridge (rev c2)
00:1f.0 ISA bridge: Intel Corp. 82801EB/ER (ICH5/ICH5R) LPC Bridge (rev 02)
00:1f.1 IDE interface: Intel Corp. 82801EB/ER (ICH5/ICH5R) Ultra ATA 100 Storage Controller (rev 02)
00:1f.2 IDE interface: Intel Corp. 82801EB (ICH5) Serial ATA 150 Storage Controller (rev 02)
00:1f.3 SMBus: Intel Corp. 82801EB/ER (ICH5/ICH5R) SMBus Controller (rev 02)
00:1f.5 Multimedia audio controller: Intel Corp. 82801EB/ER (ICH5/ICH5R) AC'97 Audio Controller (rev 02)
01:01.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)

I also installed fedora core 2 and the kernel version is 2.6.5-1.358.

As was mentioned in ur reply , i tried to check for modules from the /lib/modules/2.6.5-1.358 directory. But i couldn't figure which module to load.

Waiting for ur reply.........

ankur_linuxfan 11-26-2004 11:57 AM

i think i got my problem fixed . Actually while creating character special file through mknod , i was giving incorrect major and minor numbers. The actual nos should have been 14 3 instead of 121 2
Anyway thanks for ur help.........


All times are GMT -5. The time now is 01:00 PM.