# FreeBSD 9.0-RC1 play audio CD



## zeissoctopus (Oct 21, 2011)

Acer 5552 notebook cannot play audio cd by cdcontrol.

cdcontrol can:

read the track list from audio cd.
eject the audio cd.

cdcontrol cannot:
play audio cd. (no sound and exit after 1 sec)

My KERNCONF

```
device          ahci
device          ata
device          atapicam
options         ATA_CAM
options         ATA_STATIC_ID
device          pci
device          scbus     
device          ch             
device          ada
device          da            
device          cd           
device          pass           
device		sound
device		snd_hda
```

kernel dmesg

```
cd0 at ahcich1 bus 0 scbus1 target 0 lun 0
cd0: <PIONEER BD-ROM BDCTD03RS 1.01> Removable CD-ROM SCSI-0 device 
cd0: 150.000MB/s transfers (SATA 1.x, UDMA5, ATAPI 12bytes, PIO 8192bytes)
...
pcm0: <HDA ATI RS690/780 HDMI PCM #0 HDMI> at cad 0 nid 1 on hdac0
pcm1: <HDA Realtek ALC272 PCM #0 Analog> at cad 0 nid 1 on hdac1
pcm2: <HDA Realtek ALC272 PCM #1 Analog> at cad 0 nid 1 on hdac1
```

dev node

```
/dev/cd0
/dev/mixer0
/dev/mixer1
/dev/mixer2
/dev/pass0
/dev/pass1
/dev/pass2
/dev/sndstat
/dev/xpt0
```

my /boot/loader.conf 

```
kern.cam.cd.0.minimum_cmd_size=16
```

my /etc/sysctl.conf 

```
hw.snd.default_unit=1
```

my /etc/devfs.conf

```
perm cd0   0666
perm pass1 0666
perm xpt0  0666
```

I try to play audio cd with cdcontrol but fail.

I compile multimedia/mplayer with libcdio option result with compiling errors in audio/cdparanoia.

I download the unofficial patch of audio/cdparanoia at PR 161760

After compiling mplayer successfully, I can play audio CD with mplayer following command.

```
$ mplayer -cdrom-device /dev/cd0 cdda://1-9
```

I try one more time with cdcontrol but fail again.


----------



## nrgmilk (Oct 15, 2012)

mee too.

FreeBSD 9.1-PRERELEASE GENERIC
cd0: <Optiarc DVD RW AD-7560S SB01> Removable CD-ROM SCSI-0 device

Only a noise can be heard if ripping is carried out.


----------



## wblock@ (Oct 15, 2012)

Note: this thread is a year old.

AFAIR cdcontrol(1) exits after starting the CD.  Your audio may just be going to the headphone jacks.  It's also possible to run cdcontrol(1) interactively.


----------



## nox@ (Nov 25, 2012)

*Use DAE*

cdcontrol(1) plays via a CD drive's analog output which nowadays usually either isn't connected anywhere or doesn't exist at all.  So you'll have better luck playing via DAE (Digital Audio Extraction), i.e. via the (S)ATA connection instead of analog output (or just rip the CD right away for example using audio/abcde or sysutils/k3b-kde4 and then play the ripped files.)

If you really want to play the CD instead of ripping it you can use multimedia/mplayer:

mplayer -cache 4096 -cdrom-device /dev/cd0 cdda://

*but* you'll have to build the mplayer port with the LIBCDIO option enabled. (You can also pass a track number after "cdda://".)

And if you want to do this as user instead of only as root you'll have to change permissions for /dev/xpt0 and the /dev/passX corresponding to cd0 (and possibly for /dev/cd0 itself too if you are not in the operator group), you can find passX by running:
`# camcontrol devlist`
see the pkg-message for sysutils/k3b-kde4 for example here: http://svnweb.freebsd.org/ports/head/sysutils/k3b-kde4/pkg-message?revision=300897&view=markup.

HTH, 
Juergen


----------

