Kernel panic on FreeBSD 6.0-BETA1

OSS specific BSD discussion (FreeBSD/NetBSD/OpenBSD)

Moderators: hannu, dev, cesium, kodachi

Postby BSDKaffee » Tue Oct 25, 2005 7:17 am

I am happy to report that OSS is finally working on my ICH5 box now. I am using FreeBSD 6.0-RC1 and the OSS 3.99.3c drivers built for FreeBSD 6.0-RC1.

Everything seems to be functioning as before. The only problem now is that when OSS is started, all of the devices are given r-------- permissions. Also, no /dev/dsp and no /dev/mixer links are created. To compensate, I have had to put chmod commands and make the links in /etc/rc.local.

Thanks OSS crew! :)
BSDKaffee
 
Posts: 28
Joined: Tue Jul 19, 2005 7:17 pm

Postby dragan » Tue Oct 25, 2005 11:47 am

BSDKaffee wrote:Everything seems to be functioning as before. The only problem now is that when OSS is started, all of the devices are given r-------- permissions. Also, no /dev/dsp and no /dev/mixer links are created. To compensate, I have had to put chmod commands and make the links in /etc/rc.local.


man 5 devfs.conf
dragan
 

Postby BSDKaffee » Tue Oct 25, 2005 3:46 pm

dragan wrote:
BSDKaffee wrote:Everything seems to be functioning as before. The only problem now is that when OSS is started, all of the devices are given r-------- permissions. Also, no /dev/dsp and no /dev/mixer links are created. To compensate, I have had to put chmod commands and make the links in /etc/rc.local.


man 5 devfs.conf
Err, you might want to read that manpage for yourself. devfs.conf only applies to devices created at boot time, therefore it could never be applied to OSS. While a devfs ruleset (devfs.rules) could adjust the permissions, it cannot address the issue of the symlinks. OSS used to set reasonable permissions and create the links...400 is a little ridiculous.

The only more useful thing I think I could do at this point in time is create an rc wrapper to start and stop OSS and create a separate ruleset maybe.
BSDKaffee
 
Posts: 28
Joined: Tue Jul 19, 2005 7:17 pm

Postby Guest » Tue Oct 25, 2005 4:58 pm

Yeh. I made a small script for myself (/usr/local/etc/rc.d/0.soundon.sh):
Code: Select all
#!/bin/sh

case $1 in
        start)
                /usr/lib/oss/bin/soundon && ln -s /dev/mixer0 /dev/mixer && ln -s /dev/dsp15 /dev/dsp && chmod 660 /dev/dsp* /dev/mixer* && mixer vol 100 pcm 88 line 0 mic 0 cd 0 igain 0 line1 0 phin 0 1>/dev/null 2>/dev/null &
                ;;
        stop)
                /usr/lib/oss/bin/soundoff
                ;;
        *)
                exit 2
                ;;
esac

exit 0
Guest
 

Postby dev » Tue Oct 25, 2005 7:05 pm

Anonymous wrote:Yeh. I made a small script for myself (/usr/local/etc/rc.d/0.soundon.sh):
Code: Select all
#!/bin/sh

case $1 in
        start)
                /usr/lib/oss/bin/soundon && ln -s /dev/mixer0 /dev/mixer && ln -s /dev/dsp15 /dev/dsp && chmod 660 /dev/dsp* /dev/mixer* && mixer vol 100 pcm 88 line 0 mic 0 cd 0 igain 0 line1 0 phin 0 1>/dev/null 2>/dev/null &
                ;;
        stop)
                /usr/lib/oss/bin/soundoff
                ;;
        *)
                exit 2
                ;;
esac

exit 0


Great, we'll apply this patch to the next update for OSS.


Regards
Dev Mazumdar
dev
 
Posts: 577
Joined: Fri Sep 12, 2003 6:08 am
Location: Culver City, CA

Postby BSDKaffee » Tue Oct 25, 2005 9:18 pm

That's very similar to what I did:
Code: Select all
#!/bin/sh

ossdir=/usr/local/lib/oss/bin
rulesetnum=200

case "$1" in
start)
        if [ -x $ossdir/soundon ]; then
                $ossdir/soundon
                /sbin/devfs rule -s $rulesetnum applyset
                ln -s /dev/dsp2 /dev/dsp
                ln -s /dev/mixer0 /dev/mixer
        fi
        ;;
stop)
        if [ -x $ossdir/soundoff ]; then
                 $ossdir/soundoff
                 rm /dev/dsp
                 rm /dev/mixer
        fi
        ;;
*)
        echo "Usage: `basename $0` {start|stop}" >&2
        exit 64
        ;;
esac

I added the following to /etc/devfs.rules to complete the script:
Code: Select all
[oss_rules=200]
add path 'dsp*' mode 666
add path 'mixer*' mode 666
add path 'audio*' mode 666
add path 'midi*' mode 666
add path sequencer mode 666
add path music mode 666
add path dmfm0 mode 666


Unless you reboot, with the rules in devfs.rules, the script cannot be used until the rules are added. To do this, you could put all of the required rules in a text file and use the following command:
Code: Select all
devfs rule -s 200 add - < oss_rules
200 is an arbitrary number. But if this were to be done with a script, the script should check to see if the ruleset number exists for another ruleset. A comparison with the output of:
Code: Select all
devfs rule showsets
should work.

Just an idea.
BSDKaffee
 
Posts: 28
Joined: Tue Jul 19, 2005 7:17 pm

Postby dev » Wed Oct 26, 2005 3:49 pm

I think the better approach is to get the devfs guys in BSD to add the OSS devices in the devfs.conf file. OSS devices are "legacy". Then again, I'll see how the OSS drivers in the fBSD kernel handle device creation.


Many thanks!


regards
Dev Mazumdar

BSDKaffee wrote:That's very similar to what I did:
Code: Select all
#!/bin/sh

ossdir=/usr/local/lib/oss/bin
rulesetnum=200

case "$1" in
start)
        if [ -x $ossdir/soundon ]; then
                $ossdir/soundon
                /sbin/devfs rule -s $rulesetnum applyset
                ln -s /dev/dsp2 /dev/dsp
                ln -s /dev/mixer0 /dev/mixer
        fi
        ;;
stop)
        if [ -x $ossdir/soundoff ]; then
                 $ossdir/soundoff
                 rm /dev/dsp
                 rm /dev/mixer
        fi
        ;;
*)
        echo "Usage: `basename $0` {start|stop}" >&2
        exit 64
        ;;
esac

I added the following to /etc/devfs.rules to complete the script:
Code: Select all
[oss_rules=200]
add path 'dsp*' mode 666
add path 'mixer*' mode 666
add path 'audio*' mode 666
add path 'midi*' mode 666
add path sequencer mode 666
add path music mode 666
add path dmfm0 mode 666


Unless you reboot, with the rules in devfs.rules, the script cannot be used until the rules are added. To do this, you could put all of the required rules in a text file and use the following command:
Code: Select all
devfs rule -s 200 add - < oss_rules
200 is an arbitrary number. But if this were to be done with a script, the script should check to see if the ruleset number exists for another ruleset. A comparison with the output of:
Code: Select all
devfs rule showsets
should work.

Just an idea.
dev
 
Posts: 577
Joined: Fri Sep 12, 2003 6:08 am
Location: Culver City, CA

Postby dragan » Thu Oct 27, 2005 1:10 pm

BSDKaffee wrote:
dragan wrote:
BSDKaffee wrote:Everything seems to be functioning as before. The only problem now is that when OSS is started, all of the devices are given r-------- permissions. Also, no /dev/dsp and no /dev/mixer links are created. To compensate, I have had to put chmod commands and make the links in /etc/rc.local.


man 5 devfs.conf
Err, you might want to read that manpage for yourself. devfs.conf only applies to devices created at boot time


What says you can't restart devfs?

I use this in a similar setting with USB devices. Works for me.
dragan
 

Postby infofarmer » Sat Oct 29, 2005 11:47 pm

dragan wrote:What says you can't restart devfs?

I use this in a similar setting with USB devices. Works for me.

Right. My first solution was to add perms and links to devfs.conf
and then restart devfs just after soundon.

Now I added this to /etc/devfs.rules:
Code: Select all
[devfs_oss=15]
add path 'dsp*' mode 0660 group wheel
add path 'audio*' mode 0660 group wheel
add path 'midi*' mode 0660 group wheel
add path 'mixer*' mode 0660 group wheel
add path 'music*' mode 0660 group wheel

and this to /etc/rc.conf:
Code: Select all
devfs_system_ruleset="devfs_oss"

It does not fix links (I do it from a script), but it somehow feels more right. Chmod'ding is still a more flexible solution in case of a standardized solution, anyway.


Dear Dev Mazumdar,

How would you look at a freebsd port for opensound? Can you permit users to download it automatically, i.e. without visiting your site? I know that ftp access is open to public, but that's not official. The idea is to detect the exact version (down to BETA2-3-4...), download, unpack and install the version needed.

The port will be marked restricted, of course, with a remark about being free for non-commercial use only.
infofarmer
 
Posts: 19
Joined: Sun Aug 28, 2005 1:40 pm
Location: Moscow

Postby dev » Thu Nov 03, 2005 5:06 am

infofarmer wrote:
dragan wrote:What says you can't restart devfs?

I use this in a similar setting with USB devices. Works for me.

Right. My first solution was to add perms and links to devfs.conf
and then restart devfs just after soundon.

Now I added this to /etc/devfs.rules:
Code: Select all
[devfs_oss=15]
add path 'dsp*' mode 0660 group wheel
add path 'audio*' mode 0660 group wheel
add path 'midi*' mode 0660 group wheel
add path 'mixer*' mode 0660 group wheel
add path 'music*' mode 0660 group wheel

and this to /etc/rc.conf:
Code: Select all
devfs_system_ruleset="devfs_oss"

It does not fix links (I do it from a script), but it somehow feels more right. Chmod'ding is still a more flexible solution in case of a standardized solution, anyway.


Dear Dev Mazumdar,

How would you look at a freebsd port for opensound? Can you permit users to download it automatically, i.e. without visiting your site? I know that ftp access is open to public, but that's not official. The idea is to detect the exact version (down to BETA2-3-4...), download, unpack and install the version needed.

The port will be marked restricted, of course, with a remark about being free for non-commercial use only.



Right now there's no point in doing a freebsd ports. We already have a built in automatic updater (/usr/lib/oss/bin/ossupdate) that will correctly id the version you have and any new versions on the net).

Please wait - we're right now trying to fix up Intel High definition audio.


regards
Dev Mazumdar
dev
 
Posts: 577
Joined: Fri Sep 12, 2003 6:08 am
Location: Culver City, CA

poker casino721

Postby poker casino721 » Sat Feb 18, 2006 6:03 pm

poker casino721
 

Previous

Return to BSD

Who is online

Users browsing this forum: Bing [Bot] and 2 guests