Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 May 2012 20:56:20 +0200
From:      Polytropon <freebsd@edvax.de>
To:        freebsd-questions@freebsd.org
Cc:        Gary Aitken <ah@dreamchaser.org>
Subject:   Re: Audio CD issue -- most everything but noise  ASUS M4A89TD mobo
Message-ID:  <20120531205620.344af89b.freebsd@edvax.de>
In-Reply-To: <4FC7B7CD.9050204@dreamchaser.org>
References:  <4FC711F6.6040206@dreamchaser.org> <20120531135420.07939dbe.freebsd@edvax.de> <4FC7B7CD.9050204@dreamchaser.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 31 May 2012 12:26:21 -0600, Gary Aitken wrote:
> On 05/31/12 05:54, Polytropon wrote:
> > On Thu, 31 May 2012 00:38:46 -0600, Gary Aitken wrote:
> >> The cd mounts a regular file system ok and audio generally works
> >> ok -- playing from a file works.
> > 
> > You're sure it's a normal audio CD? How actually is one supposed
> > to mount audio CDs? They're _audio_ CD format, no ISO-9660 file
> > system on them...?
> 
> By "normal" I mean it plays fine in a regular sound system, and
> on a windoze box via media player with the same CD player and
> the direct audio wire not hooked up.

Okay, just wanted to make sure it's no "Un-CD". :-)



> >> Successive status requests look like it is progressing through
> >> the CD just fine.
> > 
> > Does the CD drive maybe have an earphone connector so you
> > can test if anything is output? I know most modern drives
> > don't come with this connector anymore.
> 
> I'm using the earphones, and they work with mp3 files from disk.
> Who said anything about "modern"?  
> I thought all CDs came from old junk machines. :-)
> Novel idea.  This cd has one, and I get audio from it.
> So cdcontrol seems to be controlling operation just fine,
> there's just no audio getting into the guts of the os.

Good, this is a good way through the disgnostic steps. It
proves that the device actually plays CD audio (which we
expected, but now we're sure). Problem remaining: That
sound doesn't make it to the sound card (resp. its
implementation in the board's chipset).



> >> The CD does not have any direct to mobo audio wire, only the ATA cable.
> >> I'm assuming fbsd gets the audio down the ata cable, correct?
> > 
> > As far as I remember... NO.
> > 
> > I've been using FreeBSD with working CD audio in the past,
> > but I always had the wire installed (in many different
> > constellations, such as with using SCSI drives, using an
> > individual sound card, or having multiple line-ins on
> > the main board). _This_ method did always work.
> 
> Ugh.  
> Mobo:
>   ASUS M4A89TD Pro/USB3
> doesn't even have a place to plug in the separate digital audio input cable.
> At least not that I can identify.

This functionality is not present on modern boards anymore.
Also note it's not digital. It's analog. GND plus two
channels. Audio transmission using the 40/80 pin (P)ATA
cable would have been digital.

Still, there _is_ a way of a workaround which is so ugly and
partially stupid that I fear to mention it.

You need a cable, 2 x 3.5mm stereo jack, which you connect
from the front connector of the CD drive to the line-in
connector on the back of your machine (the main baord's
line-in connector, typically colored light blue).

I didn't say anything! :-)



> > Just to make sure, check your mixer settings. Yes I know,
> > it's stupid to emphasize it, but _I_ have been fallen
> > into that trap already. :-)
> > 
> > 	Mixer vol      is currently set to  75:75
> > 	Mixer pcm      is currently set to  50:50
> > 	Mixer cd       is currently set to   0:0
> > 
> > In _such_ a situation, missing sound is nothing special.
> 
> How about missing cd?????
> 
> Mixer vol      is currently set to 100:100
> Mixer pcm      is currently set to  75:75
> Mixer line     is currently set to  75:75
> Mixer mic      is currently set to   0:0
> Mixer mix      is currently set to   0:0
> Mixer rec      is currently set to  75:75
> Mixer igain    is currently set to 100:100
> Mixer ogain    is currently set to  50:50
> Recording source: mic
> 
> I don't see any "cd".  Where does that come from? 

Okay, this means the mixer doesn't even have a CD audio
mixer channel. If I remember correctly, this channel is
directly associated to the internal audio connector which
is _not_ present in your system.



> There is a /dev/cd0:
> 
> ls -l /dev/cd0
> crw-r-----  1 root  operator    0, 115 May 30 09:29 /dev/cd0
> 
> If I try to add "cd" to the list of devices, it claims it's not valid:
> 
> #mixer +rec cd
> mixer: unknown recording device: cd
> usage: mixer [-f device] [-s | -S] [dev [+|-][voll[:[+|-]volr]] ...
>        mixer [-f device] [-s | -S] recsrc ...
>        mixer [-f device] [-s | -S] {^|+|-|=}rec rdev ...
>  devices: vol, pcm, line, mic, mix, rec, igain, ogain
>  rec devices: line, mic, mix

The /dev/cd0 device is the "SCSI translated" device which does
perform the same purpose as /dev/acd0, except that it's not
using the ATAPI "command set", but the SCSI "command set".

See "man 4 cd" and "man 4 acd" for comparison.



> What is the source for the "mix" device?
> I tried upping it to 50% but still no sound.

If I remember correctly, "mix" is the combined input of all
input channels.



> "man snd" shows a boatload of possible bridge drivers, but kldstat only shows a few loaded:
> 
> %kldstat -v | grep "sound\|snd\|pcm"
>                 252 uaudio/ua_pcm
>                 250 sound
>                 249 pci/snd_hda
>                 248 hdac/snd_hda_pcm
>                 247 pci/snd_via8233
>                 246 pci/snd_ich
>                 245 pci/snd_es137x
> 
> This mobo has an ALC892 codec.
> dmesg shows:
> 
> hdac0: <ATI (Unknown) High Definition Audio Controller> mem 0xfe9bc000-0xfe9bffff irq 25 at device 0.1 on pci5
> 
> hdac1: <ATI SB600 High Definition Audio Controller> mem 0xfe6f8000-0xfe6fbfff irq 16 at device 20.2 on pci0

You can also check the content of /dev/sndstat. It will look
like this:

	% cat /dev/sndstat 
	FreeBSD Audio Driver (newpcm: 32bit 2009061500/i386)
	Installed devices:
	pcm0: <HDA VIA VT1708_8 PCM #0 Analog> (play/rec) default
	pcm1: <HDA VIA VT1708_8 PCM #1 Analog> (rec)
	pcm2: <HDA VIA VT1708_8 PCM #2 Digital> (play)

Your output will list your actual devices. It's okay to assume
the the proper drivers have been loaded.



> I also see the following at the end of dmesg:
> 
> (cd0:ata2:0:0:0): READ(10). CDB: 28 0 0 0 0 0 0 0 40 0
> (cd0:ata2:0:0:0): CAM status: SCSI Status Error
> (cd0:ata2:0:0:0): SCSI status: Check Condition
> (cd0:ata2:0:0:0): SCSI sense: ILLEGAL REQUEST asc:64,11 (Reserved ASC/ASCQ pair)
> (cd0:ata2:0:0:0): cddone: got error 0x16 back
> (cd0:ata2:0:0:0): MODE_SENSE(6) failed, increasing minimum CDB size to 10 bytes
> (cd0:ata2:0:0:0): PLAY AUDIO MSF. CDB: 47 0 0 0 0 0 43 36 0 0
> (cd0:ata2:0:0:0): CAM status: SCSI Status Error
> (cd0:ata2:0:0:0): SCSI status: Check Condition
> (cd0:ata2:0:0:0): SCSI sense: ILLEGAL REQUEST asc:21,0 (Logical block address out of range)
> (cd0:ata2:0:0:0): PLAY AUDIO MSF. CDB: 47 0 0 0 2 0 43 36 0 0
> (cd0:ata2:0:0:0): CAM status: SCSI Status Error
> (cd0:ata2:0:0:0): SCSI status: Check Condition
> (cd0:ata2:0:0:0): SCSI sense: ILLEGAL REQUEST asc:21,0 (Logical block address out of range)
> 
> Those last four are repeated four five times total, and then:
> 
> (cd0:ata2:0:0:0): READ SUB-CHANNEL. CDB: 42 2 40 2 0 0 0 0 18 0
> (cd0:ata2:0:0:0): CAM status: SCSI Status Error
> (cd0:ata2:0:0:0): SCSI status: Check Condition
> (cd0:ata2:0:0:0): SCSI sense: ILLEGAL REQUEST asc:2c,0 (Command sequence error)
> 
> repeated a number of times.  It's not clear to me when they
> showed up, as pausing, resuming, ejecting, loading, and
> playing a cd using cdcontrol doesn't seem to be adding
> any entries.

They appear when trying to access the CD drive via "SCSI commands",
i. e. using /dev/cd0.



> I tried doing
> 
> kldload snd_atiixp
> 
> but it didn't seem to make a difference.  

>From the manpage: "The snd_atiixp bridge driver allows the
generic audio driver, sound(4), to attach to ATI IXP audio
devices." Not sure if that applies. Do you have an ATI IXP
audio device?



> I also don't have a clue whether or not that is an appropriate bridge driver.
> But maybe one needs to do something more to get it to actually
> try to use that bridge driver?

As I said, I think the system did already load the correct
driver. If you load sound.ko, the correct driver will be
automatically chosen. The laternative is to specify the
correct driver in /boot/loader.conf or compile it into
your kernel (if you're running a non-GENERIC kernel).






-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120531205620.344af89b.freebsd>