From owner-freebsd-questions@freebsd.org Tue Nov 8 10:10:28 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 92A7DC36BD3 for ; Tue, 8 Nov 2016 10:10:28 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 356C8BB2 for ; Tue, 8 Nov 2016 10:10:27 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de (port-92-195-250-109.dynamic.qsc.de [92.195.250.109]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx02.qsc.de (Postfix) with ESMTPS id 56E702780C; Tue, 8 Nov 2016 11:10:25 +0100 (CET) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id uA8AAOSm006208; Tue, 8 Nov 2016 11:10:24 +0100 (CET) (envelope-from freebsd@edvax.de) Date: Tue, 8 Nov 2016 11:10:24 +0100 From: Polytropon To: No Spam Cc: freebsd-questions@freebsd.org Subject: Re: Sound Problems [Noob Question] Message-Id: <20161108111024.677bb22e.freebsd@edvax.de> In-Reply-To: <20161108092024.GC1197@bsd.lan> References: <20161108084122.GB1197@bsd.lan> <20161108095743.1b5c46ed.freebsd@edvax.de> <20161108092024.GC1197@bsd.lan> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Nov 2016 10:10:28 -0000 On Tue, 8 Nov 2016 10:20:24 +0100, No Spam wrote: > On 16-11-08 09:57:43, Polytropon wrote: > > On Tue, 8 Nov 2016 09:41:22 +0100, Jens wrote: > > > Hi Guys, > > > > > > the solution to my problem is probably easy but i can't find it. > > > > > > The only sound i get from my > > > > > > \code > > > # uname -a > > > > > > FreeBSD bsd.lan 11.0-RELEASE-p1 FreeBSD > > > 11.0-RELEASE-p1 #0 r306420: Thu Sep 29 01:43:23 UTC 2016 > > > root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 > > > \endcode > > > > > > other then some garbled static or a feedback loop when i begin closing > > > my notebook ( a ASUS F751M ). > > > > Have you checked your mixer settings? The command "mixer" provided > > by the OS can do this. Example: > > > > % mixer > > Mixer vol is currently set to 75:75 > > Mixer pcm is currently set to 75:75 > > Mixer line is currently set to 0:0 > > Mixer mic is currently set to 0:0 > > Mixer cd is currently set to 0:0 > > Mixer rec is currently set to 0:0 > > Mixer igain is currently set to 0:0 > > Mixer monitor is currently set to 0:0 > > Recording source: mic > > > > If the system exposes more than one mixer to the OS, the -f flag > > can be used to query and set the various mixers. See "man mixer" > > for details. > > > > > mixer > Mixer vol is currently set to 100:100 > Mixer pcm is currently set to 100:100 > Mixer speaker is currently set to 100:100 > Mixer mix is currently set to 74:74 > Mixer rec is currently set to 37:37 > Mixer igain is currently set to 81:81 > Mixer ogain is currently set to 100:100 > Mixer monitor is currently set to 56:56 > Recording source: monitor That looks correct. > > > I tested the speaker system itself by booting a live linux and it worked > > > out of the box, but i would like to stick with FreeBSD. > > > > Maybe Linux defaults to a different audio unit? Modern hardware > > often does have more than one "sound card" (similar to mixers). > > The sysctl "hw.snd.default_unit" can control which unit will be > > used. > > > cat /dev/sndstat > Installed devices: > pcm0: (play/rec) default > pcm1: (play) > pcm2: (pl Good, the device has been correctly recognized, and a sound driver has been attached. > sysctl hw.snd.default_unit > hw.snd.default_unit: 0 > > that looks right? I'd say yes, that seems to be the default unit. > > > I included my /etc/rc.conf and my /boot/loader.conf . > > > > Allow me to quote the relevant entries: > > > > [rc.conf text/plain (911B)] > > > > pulseaudio_enable="YES" > > #oss_enable="YES" > > > > Do you have the playback problem from inside a IDE, or does the > > problem also appear when you test audio "on bare metal"? How do > > you test audio? > I do not understand IDE in this context. > > i was testing audio with differnt userland applications, > eg firefox and now again with a root vlcp-player which generates an > audio "artifact" ( a sound rumbling stopping version of what was the > original sound) Can you test something really simple like "madplay somefile.mp3" or "play someotherfile.wav" (the "play" command is part of the "sox" package)? Just to make sure it isn't related to any more or less complex codec or muxer format? > > > If you have any ideas what i can try or which configs you need, i will > > > try to answer ASAP. > > > > Always check the output of the following commands: > > > > % dmesg | grep ^pcm > > % cat /dev/sndstat > > > > Verify that the correct sound driver has successfully been loaded. > > > > > dmesg is currently not giving any pcm entrys ( because my ath card has > filles the log) > will reboot and send that one later Relevant lines from other message: pcm0: at nid 20 and 27 on hdaa0 pcm1: at nid 33 on hdaa0 pcm2: at nid 4 on hdaa1 The "High Definition Audio" driver should be the right one to deal with that hardware. See "man 4 snd_hda" for possible configuration options. However, you wrote that you see this problem when closing the notebook. FreeBSD's support for suspend/resume and hibernation (whatever applies to your specific setup when closing the lid) sometimes requires to load an additional ACPI kernel module (like for example acpi_ibm.ko), and in other cases, it doesn't work at all. While I've seen this kind of operation working on Linux, the FreeBSD experience is that it often does not work as expected. A workaround would be _not_ to close the laptop. ;-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...