Thursday, February 9, 2006

Playing Audio CDs

Someone on the PC-BSD forums was saying that they couldn't play their audio CDs. KsCD, the KDE audio play, wouldn't recognize that there was an audio cd in the drive. After some poking around, here's the answer I came up with:

Okay, here's what I found out vis-a-vis playing an audio cd using KsCD. The problem is two-fold:

1] KsCD defaults to use /dev/cdrom. This isn't enabled by PCBSD by default.

2] The CDROM device, usually /dev/acd0, isn't readable by a non-root, non-operator user.

For the default user, just changing which device KsCD uses should make audio playable. You do via the Extras button, and "Configure KsCD..." to use /dev/acd0. This is because I think the user created at install is a member of the operator group, which means you should now be able to play your audio cd.

However, if you create another, completely "vanilla", user, they will not be able to play audio cds, because the permissions aren't correct.

Both of these problems can be fixed with a couple of small tweaks to the /etc/devfs.conf file. This file sets permissions and the like for device filesystems at boot time, and already has the lines in it that you need.

For problem #1, you can uncomment the line that says "link acd0 cdrom" by deleting the leading #. Note the comment just above, which says many ports use this.

But a normal user still won't be able to play audio CDs. You need to go down a couple of lines and change the appropriate 'perm' line that matches your cd drive(s). Change the 0660 to either 0664 (to allow normal users to read the cd) or 0666 (to allow normal users to read and write the cd). So in the usuall case, it would be thus:

perm /dev/acd0 0666

I would suggest at the very least, the link line should be uncommented in an install, and I would further suggest that the perm line for /dev/acd0 be changed to be 0666.

3 comments:

  1. Excellent! Glad I could help. I still have to figure out how to use sound on my PCBSD system though. I have an old, non-PnP ISA sound card that needs special tweaks. The audio CD works because it plays directly from the CD player to the soundcard, but other things (like an MP3 player) need a device and I haven't figured out the magical incantations yet.

    ReplyDelete
  2. Thanks for this! I'm a new FreeBSD user (as a desktop OS at least) and I was struggling with the simple task of playing an audio cd. Your advice was clear and effective.

    ReplyDelete
  3. Always happy to hear of success stories!

    ReplyDelete