From owner-freebsd-hackers@freebsd.org Tue May 1 11:11:16 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 531C3FA75D8 for ; Tue, 1 May 2018 11:11:16 +0000 (UTC) (envelope-from wojtek@puchar.net) Received: from puchar.net (puchar.net [194.1.144.90]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "puchar.net", Issuer "puchar.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D48FD69068 for ; Tue, 1 May 2018 11:11:15 +0000 (UTC) (envelope-from wojtek@puchar.net) Received: Received: from 127.0.0.1 (localhost [127.0.0.1]) by puchar.net (8.15.2/8.15.2) with ESMTPS id w41BBIJr021821 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 1 May 2018 13:11:18 +0200 (CEST) (envelope-from puchar-wojtek@puchar.net) Received: from localhost (puchar-wojtek@localhost) by puchar.net (8.15.2/8.15.2/Submit) with ESMTP id w41BBDVR021818; Tue, 1 May 2018 13:11:13 +0200 (CEST) (envelope-from puchar-wojtek@puchar.net) Date: Tue, 1 May 2018 13:11:13 +0200 (CEST) From: Wojciech Puchar To: James Wright cc: freebsd-hackers@freebsd.org Subject: Re: new laptop, no sound in spite of driver attaching In-Reply-To: <1fb3f697-b0b6-69e1-ec16-cb0214c9487e@jigsawdezign.com> Message-ID: References: <83d82ee4-ea07-1082-e4d9-a969a8588167@vangyzen.net> <9aabed2a-17c2-231f-3091-9f37126222e1@vangyzen.net> <1fb3f697-b0b6-69e1-ec16-cb0214c9487e@jigsawdezign.com> User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 May 2018 11:11:16 -0000 > To get sound working on my MacbookAir I have the following in > "/boot/loader.conf" > > # Fix audio output not getting any voltage, see: man snd_hda > hint.hdaa.1.config="ovref" > hint.hdaa.1.gpio_config="0=set" > lots of tries but i think it's not a problem because of pcm0: chn_write(): pcm0:virtual:dsp0.vp0: play interrupt timeout, channel dead so it doesn't seem like sound not being directed properly but dma/irq problem. > # Assign Headphones (nid16) to same "as" group as Speakers with seq=15 to > enable switching between them > hint.hdaa.1.nid16.config="as=1 seq=15" > > Had to use the time old method of Trial and Error using various combinations > of values for the first two lines until it finally worked! > > Probably won't be the same values for your laptop, but might give you a path > of enquiry... > > PS: I'm deeply grateful for the work done on bringing the i915 driver upto > scratch for Intel Broadwell, i installed /usr/ports/graphics/drm-stable-kmod to get working intel graphics. but works fine now. > it has meant I can now use FreeBSD as my main OS on this laptop everyday with > fantastic battery life too (~16 hours!) > > > On 30/04/2018 16:54, Richard Yao wrote: >> >>> On Apr 30, 2018, at 11:15 AM, Eric van Gyzen wrote: >>> >>>> On 04/30/2018 09:57, Richard Yao wrote: >>>> >>>> >>>>>> On Apr 30, 2018, at 10:43 AM, Eric van Gyzen wrote: >>>>>> >>>>>> On 04/30/2018 06:58, Wojciech Puchar wrote: >>>>>> and no idea where to search for a solution >>>>>> >>>>>> FreeBSD laptop.wojtek.intra 11.1-STABLE FreeBSD 11.1-STABLE #2: Mon Apr >>>>>> 30 13:35:54 CEST 2018 >>>>>> root@laptop.wojtek.intra:/usr/src/sys/amd64/compile/laptop amd64 >>>>>> >>>>>> >>>>>> in dmesg >>>>>> hdac0: mem 0x91410000-0x91413fff irq 22 >>>>>> at device 27.0 on pci0 >>>>>> hdacc0: at cad 0 on hdac0 >>>>>> hdaa0: at nid 1 on hdacc0 >>>>>> pcm0: at nid 20 and 25 on hdaa0 >>>>>> pcm1: at nid 33 and 18 on hdaa0 >>>>>> hdacc1: at cad 2 on hdac0 >>>>>> hdaa1: at nid 1 on hdacc1 >>>>>> pcm2: at nid 5 on hdaa1 >>>>>> >>>>>> >>>>>> tried to change hw.snd.default_unit to 0, 1 or 2 - no sound in any >>>>>> case. >>>>>> >>>>>> mixer when default_unit is 0 >>>>>> >>>>>> Mixer vol is currently set to 65:65 >>>>>> Mixer pcm is currently set to 100:100 >>>>>> Mixer speaker is currently set to 100:100 >>>>>> Mixer mic is currently set to 0:0 >>>>>> Mixer mix is currently set to 100:100 >>>>>> Mixer rec is currently set to 0:0 >>>>>> Mixer igain is currently set to 0:0 >>>>>> Mixer ogain is currently set to 100:100 >>>>>> Recording source: mic >>>>>> >>>>>> >>>>>> mixer when default_unit is 1 >>>>>> >>>>>> Mixer vol is currently set to 100:100 >>>>>> Mixer pcm is currently set to 100:100 >>>>>> Mixer rec is currently set to 37:37 >>>>>> Mixer igain is currently set to 0:0 >>>>>> Mixer monitor is currently set to 56:56 >>>>>> >>>>>> mixer when default_unit is 2 >>>>>> >>>>>> Mixer vol is currently set to 100:100 >>>>>> Mixer pcm is currently set to 100:100 >>>>>> >>>>>> this is HP 250 G5 laptop >>>>> HDA is apparently very difficult for vendors to get right. Linux has >>>>> thousands of lines of vendor- and model-specific patches to fix it. >>>>> Start here: >>>>> >>>>> https://github.com/torvalds/linux/blob/master/sound/pci/hda/patch_realtek.c >>>>> >>>>> If you're lucky, you'll find a patch for your laptop or a similar laptop >>>>> that has the same problem(s). The next step is to figure out how to >>>>> express the patch in FreeBSD's driver. >>>>> >>>>> Hopefully, someone will take interest in porting many of Linux's HDA >>>>> patches to FreeBSD. Sound is probably one of the top three reasons >>>>> people fail to run FreeBSD on their laptop. >>>> What are the other two? Graphics support and easy management of WiFi? >>> I would say graphics and suspend/resume. WiFi management is certainly >>> an annoyance, but if the hardware works, I can cope with that. If the >>> sound hardware doesn't work, it's useless (until I can find the time to >>> study /two/ HDA drivers). >>> >>> Granted, I had to replace the Atheros card in my XPS 13 with an Intel, >>> but that was only 19 USD and about 20 minutes, so that was also just an >>> annoyance. >> Certain laptops have BIOS whitelists that prevent people from doing that >> without flashing coreboot modifying the BIOS. You were lucky. >>>> I hate to say that, but those are the two that kept me from adopting >>>> Gentoo FreeBSD on my laptop when I wanted to install it several years >>>> ago. The intel sandy bridge graphics support was new enough that it had >>>> not really made it downstream to Gentoo FreeBSD and the lack of a network >>>> manager equivalent for doing easy connection and disconnection to WiFi >>>> networks from a BSD userland was a headache. :/ >>> I'm really grateful for all the recent graphics work. Without it, my >>> XPS 13 would be running Linux for sure. I would thank people by name, >>> but I would miss some. You know who you are. :) >>> >>> Eric >>> _______________________________________________ >>> freebsd-hackers@freebsd.org mailing list >>> https://lists.freebsd.org/mailman/listinfo/freebsd-hackers >>> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" >> _______________________________________________ >> freebsd-hackers@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/freebsd-hackers >> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > >