Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Mar 2011 22:14:51 +0700
From:      Gua Chung Lim <gua.chunglim@gmail.com>
To:        "J.R. Oldroyd" <fbsd@opal.com>
Cc:        freebsd-stable <freebsd-stable@freebsd.org>
Subject:   Re: FBSD 8.2R does not probe sound card
Message-ID:  <20110322151451.GA1416@gmail.com>
In-Reply-To: <20110321171543.2ec0e312@shibato.opal.com>
References:  <20110317142559.GA1576@gmail.com> <20110318193153.56dee965@shibato.opal.com> <20110319144153.GA1370@gmail.com> <20110319132750.7edc62b3@shibato.opal.com> <20110320064842.GA1335@gmail.com> <20110320145751.193fb06e@shibato.opal.com> <20110321053436.GA1483@gmail.com> <20110321171543.2ec0e312@shibato.opal.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi JR,

> > guacl@bsdhost:~% tail -n 1 /etc/sysctl.conf
> > hw.snd.default_unit=0
> 
> This is fine, but 0 is the default value, so you don't actually
> need this.  You only need it for value of 1, 2, 3...
Alright so I can now forget this file.

> /boot/loader.conf and /boot/loader.conf.local are used together.
> I suggest you leave loader.conf as installed by the system, and place
> all your config in loader.conf.local, although that is not so important.
Sorry, /boot/loader.conf was blank right after installation.
But it doesn't matter anyway.

> You need to get the programming so that it shows:
>     pcm0: <HDA Realtek ALC662 PCM #0 Analog> (play/rec) default
> or perhaps like mine:
>     pcm0: <HDA Realtek ALC268 PCM #0 Analog> at cad 3 nid 1 on hdac0 kld snd_hda (1p:6v/1r:1v) default
> in this one, 1p=1play, 6v=6voices=6channels (5.1 sound); 1r=1rec with
> 1channel.

> 	hint.hdac.0.cad0.nid21.config="as=1 seq=0"	# pcm0 out
> 	hint.hdac.0.cad0.nid22.config="as=2 seq=0"	# pcm1 out
> 	hint.hdac.0.cad0.nid28.config="as=3 seq=0"	# pcm2 out
> 	hint.hdac.0.cad0.nid30.config="as=4 seq=0"	# pcm3 out
> 	hint.hdac.0.cad0.nid24.config="as=5 seq=0"	# \
> 	hint.hdac.0.cad0.nid25.config="as=5 seq=1"	#  pcm0 in
> 	hint.hdac.0.cad0.nid26.config="as=5 seq=15"	# />
> Then you can play with output to /dev/dsp0.X etc to see if any work.
I have already put them in /boot/loader.conf.local.
guacl@bsdhost:~% mixer
Mixer vol      is currently set to  75:75
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   0:0
Mixer ogain    is currently set to  50:50
Mixer monitor  is currently set to  75:75
Recording source: mic
guacl@bsdhost:~% cat /dev/sndstat
FreeBSD Audio Driver (newpcm: 32bit 2009061500/i386)
Installed devices:
pcm0: <HDA Realtek ALC662 PCM #0 Analog> (play/rec) default
pcm1: <HDA ATI R6xx HDMI PCM #0 HDMI> (play)

Yes, pcm0 is now what we are expecting.
Now I can hear sound from the speakers via /dev/dsp0.X
using C code fprintf(dsp, "%c%c%c", 7, 7, 7);
(I'm only on console.)
But how can I hear the sound without redirecting to /dev/dsp?
This area is VERY FAR from my knowledge.
I think I must completely read sound(4) and snd_hda(4).

Thank you very much again.

-- 
Gua Chung Lim
 
Please help donate to Japan.
-- for earthquake, tsunami and nuclear radiation reliefs (2011)



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