From owner-freebsd-stable@FreeBSD.ORG Tue Mar 22 15:15:24 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 120A6106566B for ; Tue, 22 Mar 2011 15:15:24 +0000 (UTC) (envelope-from gua.chunglim@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id C4B988FC0A for ; Tue, 22 Mar 2011 15:15:23 +0000 (UTC) Received: by iwn33 with SMTP id 33so9006906iwn.13 for ; Tue, 22 Mar 2011 08:15:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-type :content-disposition:in-reply-to:user-agent:x-operating-system; bh=n3qcfNA7ytOBl7HKcB/FKHlgOkUXDJuoXpnBlSddGF4=; b=xU39zhe5Iixt6+3SBH1vliazWd6jnyUOLDcJtWpFz39rX2PsOoCzgRbauvPx88Mvqp +fQLkgAvbuXH1pFv7PsXI5yQ9YDvZoThEDYq3/V8J9Ka6QiNPsDEayw68p7TgLTHDZyg kNJhKztZ9hZFiuTRXMSvZmYHGiZKWW1CyF2qM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-type:content-disposition:in-reply-to :user-agent:x-operating-system; b=S/ZicAuyfovX1Hl6YU83w8icNbc1bKnD23jkJyH2b1lN3PnL7kqdWEcgp1QF1IPt2P pPUe+PyksT/MfJ9IByPncs3Cc1ezBnsm88aw79VNhP+KGk01HWKq2G2KXubkV22c93DN Rk3u2+CdhWKKL7CqTI3SPFcJ+EcB8eQ0vLB4E= Received: by 10.43.50.5 with SMTP id vc5mr6691912icb.198.1300806921343; Tue, 22 Mar 2011 08:15:21 -0700 (PDT) Received: from gmail.com ([180.180.106.68]) by mx.google.com with ESMTPS id jv9sm4682833icb.13.2011.03.22.08.15.17 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 22 Mar 2011 08:15:19 -0700 (PDT) Date: Tue, 22 Mar 2011 22:14:51 +0700 From: Gua Chung Lim To: "J.R. Oldroyd" Message-ID: <20110322151451.GA1416@gmail.com> Mail-Followup-To: "J.R. Oldroyd" , freebsd-stable 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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110321171543.2ec0e312@shibato.opal.com> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD/8.2-RELEASE (i386) Cc: freebsd-stable Subject: Re: FBSD 8.2R does not probe sound card X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Mar 2011 15:15:24 -0000 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: (play/rec) default > or perhaps like mine: > pcm0: 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: (play/rec) default pcm1: (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)