I accidentally overwrote the /dev/dsp file. Is there away to recreate it? I tried to use MAKEDEV but it says it doesn’t know how to create /dev/dsp.
I created manually a symbolic link to /dev/snd/pcmC0D0p but I am not sure if it’s right. I tried
linux-7vld:/home/pascal/.cuckoo # cat cuckoo1.au > /dev/dsp
cat: write error: File descriptor in bad state
linux-7vld:/home/pascal/.cuckoo #
On 2012-03-27 22:46, pligdas wrote:
>
> hcvv;2451790 Wrote:
>> Any reboot will recreate it. All in /dev is in a temporary RAM file
>> system and thus lost on shutdow and recreated on boot.
> Actually, that didn’t happen. I just tried it.
That would happen if you don’t have the hardware or if you don’t load the
driver.
Nothing you create in /dev will survive a reboot. You creating a device
there is useless.
–
Cheers / Saludos,
Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)
Previously, I was able to fix this problem just by issuing /sbin/modprobe /dev/snd/seq. Could that be related with my deleting /dev/dsp? For more info I paste here the contents of /dev/snd/
The general idea is that during boot (and partly/possibly later when hardware is added “on he fly”) the kernel signals hardware it finds to the udev deamon (udevd). udevd then creates the device special files within* /dev*. udev does so as configured in the udev rules (inside* /etc/udev/rules.d*). Thus normaly the creation of device special files is of no concern to even the system manager (let alone the end-user).
Maybe you can describe what your real problem is. And you then better begin with telling what level of openSUSE you use, because you failed to do so after my first request for it. And explain what you try to do and why. And what you thought that should happen. And what happened instead. That because just saying that
cat cuckoo1.au > /dev/dsp
gives an error, does not day very much. Why would one try to do that? I guess a real problem about someting that is not functioning lies behind this.
I did not read your last post before my post above (we were typing at the same time). But I styrongly suggest you describe your real problem. Nolt what goes wrong wen you somewhere on the path in curing that real problem, because nobody here will understand why you try to do these things.
E.g. as /dev/snd/seq would be a device special file (when existing), I do not see how you can use modprobe on it, because according to the man page, the parameter should be a module name.
BTW, I do have:
boven:/dev/snd # l
total 0
drwxr-xr-x 4 root root 340 Mar 28 09:49 ./
drwxr-xr-x 21 root root 4020 Mar 28 09:49 ../
drwxr-xr-x 2 root root 60 Mar 28 09:49 by-id/
drwxr-xr-x 2 root root 100 Mar 28 09:49 by-path/
crw-rw----+ 1 root audio 116, 11 Mar 28 09:49 controlC0
crw-rw----+ 1 root audio 116, 5 Mar 28 09:49 controlC1
crw-rw----+ 1 root audio 116, 13 Mar 28 09:49 controlC3
crw-rw----+ 1 root audio 116, 10 Mar 28 09:49 hwC0D0
crw-rw----+ 1 root audio 116, 9 Mar 28 09:52 pcmC0D0c
crw-rw----+ 1 root audio 116, 8 Mar 28 09:53 pcmC0D0p
crw-rw----+ 1 root audio 116, 7 Mar 28 09:52 pcmC0D1p
crw-rw----+ 1 root audio 116, 6 Mar 28 09:49 pcmC0D2c
crw-rw----+ 1 root audio 116, 4 Mar 28 09:52 pcmC1D0c
crw-rw----+ 1 root audio 116, 3 Mar 28 09:52 pcmC1D0p
crw-rw----+ 1 root audio 116, 12 Mar 28 09:52 pcmC3D0c
crw-rw----+ 1 root audio 116, 14 Mar 28 09:49 seq
crw-rw----+ 1 root audio 116, 2 Mar 28 09:49 timer
boven:/dev/snd #
which you are missing. maybe your sound card is gone?
All right then, I’ll start from the beginning. First, I don’t exactly understand what you mean openSUSE level. I am a beginner, if that’s what you meant, but I’m not sure if it is. Second, I’m working on a very simple project, i.e. build a Cuckoo clock based on cron. I started by using crontab to create a crontab file
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.qUqUR5 installed on Wed Mar 28 11:25:34 2012)
# (Cronie version 4.2)
#0-59 * * * * /home/pascal/.cuckoo/testcron.sh
0-59 * * * * /home/pascal/.cuckoo/cuckoo.sh
The commented line was first used to test the cron job by catting the output of the date command to a file. It worked fine, i.e. the file was growing one line per minute. Then, I used the second line with the actual cuchkoo comand
# rem by pascal for 1 cuckoos
play /home/pascal/.cuckoo/cuckoo.wav
which worked for the first cuckoo and then stopped. So I thought that the problem was with the play command used in the background by cron, and tried to look for alternative ways to playing sounds, hence the
On 2012-03-28 10:16, pligdas wrote:
>
> On a related problem I just noticed that /dev/snd/seq is not working. I
> tried
> Code:
> --------------------
> linux-7vld:/home/pascal # /sbin/modprobe /dev/snd/seq
> FATAL: Module /dev/snd/seq not found.
> linux-7vld:/home/pascal #
>
> --------------------
That will never work.
> Previously, I was able to fix this problem just by issuing
> /sbin/modprobe /dev/snd/seq.
Impossible. That was coincidental. It appeared to work because something
else did.
–
Cheers / Saludos,
Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)
Which you should have done in the first place. It sounds as if you do not realy like to do this. You “must” not do this. It is you who wants a solution for something. We are using our spare time to help you when you realy want help.
openSUSE, like mosty software, develops over time and thus is released in new levels over time. As we are writing this, the supported levels of openSUSE are 11.4 and 12.1. When you not know what you installed (or forgot that), post the output of
cat /etc/SuSE-release
We want to know this, like your garage wants to know if you have a Ford from 1932 or from 2002. It matters.
As your problem is that a second call of
play /home/pascal/.cuckoo/cuckoo.wav
does not give any sound, then you should concentrate on that. You should not try to write directly to write to* /dev/dsp *as an end-user.
To do similar as you do, I made the following entry in my personal *crontab:
*
henk@boven:~> crontab -l
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.QCOXlQ installed on Wed Mar 28 12:01:45 2012)
# (Cronie version 4.2)
0-59 * * * * play 'Documents/Spoor en Tramwegen/spoorwegveiligheid/Nederland/Seinenboek/www.ivw.nl/seinenboeksite/sounds/zoemer-atb.wav' >/dev/null 2>&1
henk@boven:~>
and I am getting a bit nervous now as it does sound every minute on the minute. This brings it back to it’s barebones, no scripts of your’s involved.
Tryt this and report back.
And as an extra advise: please post your computer output inclusive the command you used and the prompts (as I do above with my crontab), again it shows us a lot of things you then do not have to explain otherwise.
I should have mentioned I use openSUSE 12.1, sorry about that, and also about giving the wrong impression. I very much want to learn with this project and I appreciate your time.
As it is of course strange that it only cuckoos once, and as you state that probably some device file is removed I offer you the next test.
First remove or comment out the crontab entry. We are going to call it manualy and cron must not interfere.
Then, as you say it runs only once after a boot, reboot and then run the statments.
sted*
I really don’t believe the cron job problem has anything to do with deleting /dev/dsp, as it preexisted. Furthermore, I did an additional test by using
linux-7vld:/home/pascal # cat /var/spool/cron/tabs/pascal
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.patjWb installed on Wed Mar 28 18:49:25 2012)
# (Cronie version 4.2)
0-59 * * * * /home/pascal/.cuckoo/testcron.sh
0-59 * * * * play '/home/pascal/.cuckoo/cuckoo.wav' >/dev/null 2>&1
linux-7vld:/home/pascal #
which worked again for testcron (the file that adds the output of the ‘date’ command every minute), but still no luck for the cuckoo (just one cuckoo).
Maybe it’s my fate…
Thank you all for your helpful comments.
I am a bit disappointed. I offered you a test to find out if the problem is reproducable outside cron and what it does to the device files. You are not obliged to do it, but when you do it and expect me to study the results you do the test as asked for and repport precise.
I asked you to do in this sequence:
To remove all cuckoo or sound entries from your crontab. You do not confirm you did, but on the contrary show at the end of your post that there still are those entries.
To reboot. That you confirmed.
To execute asap after the boot (and of course without intermediate cuckooing or any other sound producing) four (4) statements. You only show the output of one where I can not see if it is the first or the third one of what I asked for. I also can not see that the play statmenets are executed and what they output. I want to see one copy/paste of those four statements in one CODE tags surrounded section. That should not be that difficult.
I will try to be as clear and precise as possible.
First, I commented out all cuckoos from my crontab file. No sound was reproduced after a reboot.
Then I did what you asked me :
Above I coloured the first three commands I asked for red. Immideatly after the third command a NewLine is missing. How is that possible?
The fourth command should have been the play command again (and youy should say if that giave sound). Instaed of that the blue command is a rpeat of the ls command.
And then yopu talk about many play commands that give sound. I asked for only one(!) as fourth command and commnet aboyt the sound of that one only and I want to see it in the copy/paste. Am I so unclear!
I should have guessed that the fourth command was a play commmand instead of a repeat of the third command as your post #14 asks. That was silly of me. However, Good News, I found the, embarrassing, problem. All the time I was playing non-stop music with Amarok… Your persistence and eye for detail made me think of it. Thank you!
Now to make a cuckoo clock that works when music is playing what would it take? Is it possible to envision a cuckoo that interrupts Amarok just to sound or ring the time, and then continue the music? Am I asking too much?
I do not know how to interupt Amarok. Do not think it is possible. But you better ask in a new thread with a title that covers it.
And please next time, do not jump to conclusions like this one about /dev/dsp. It completely blocked your possibility to see the real problem. It is as if you walked down a road and at an obstacle took a diversion instead of removing the obstacle. You did that several times end then ended up in a dead alley. And then you asked: “How to break through the wall of this dead alley?”. Then people will say “How did you arrive here in the first place?”
And after every boot you could cuckoo once, but you did not even check if ./dev/dsp was there after boot before the first cuckoo. In other words you did not even try to confirm your own strain of thoughts. That is not how one tackles a problem and especialy not computer problem.
Enjoy your cuckoo project. And some homework from me. I saw that long list of crontab entries you have ready for the future. Try to reduce that to one entry where the script finds out by itself how many cuckoos are required at that time of the day.That is programmming