From owner-freebsd-multimedia@FreeBSD.ORG Fri Jan 30 23:38:35 2009 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 36B8E1065711 for ; Fri, 30 Jan 2009 23:38:35 +0000 (UTC) (envelope-from patfbsd@davenulle.org) Received: from smtp.lamaiziere.net (net.lamaiziere.net [91.121.44.19]) by mx1.freebsd.org (Postfix) with ESMTP id EFC6B8FC24 for ; Fri, 30 Jan 2009 23:38:34 +0000 (UTC) (envelope-from patfbsd@davenulle.org) Received: from baby-jane.lamaiziere.net (67.158.192-77.rev.gaoland.net [77.192.158.67]) by smtp.lamaiziere.net (Postfix) with ESMTPA id 5F719633301 for ; Sat, 31 Jan 2009 00:21:37 +0100 (CET) Received: from baby-jane.lamaiziere.net (localhost [127.0.0.1]) by baby-jane.lamaiziere.net (Postfix) with ESMTP id 7558BC369 for ; Sat, 31 Jan 2009 00:21:35 +0100 (CET) Date: Sat, 31 Jan 2009 00:21:26 +0100 From: Patrick =?ISO-8859-15?Q?Lamaizi=E8re?= To: freebsd-multimedia@freebsd.org Message-ID: <20090131002126.33d575a1@baby-jane.lamaiziere.net> Organization: /dave/nulle X-Mailer: Claws Mail 3.7.0 (GTK+ 2.12.11; i386-portbld-freebsd7.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: [snd_hda] Sound problem on Macbook pro model 3.1 X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2009 23:38:36 -0000 Hello, I'm trying to get the sound (snd_hda) working on my Macbook pro model 3,1. I run FreeBSD 7.1 but snd_hda is taken from current of today. Identification: $ pciconf -vl hdac0@pci0:0:27:0: class=0x040300 card=0x00a0106b chip=0x284b8086 rev=0x03 hdr=0x00 vendor = 'Intel Corporation' device = '82801H &SUBSYS_81EC1043&REV_02\3&11583659&0&D8' class = multimedia subclass = HDA [Warning: according to the alsa project the PCI ID is shared between some Mac with differents HDA configurations: http://git.alsa-project.org/?p=alsa-kernel.git;a=commit;h=93a1a5eb70be5cc14990b97ef2460212e32658dc and http://lkml.org/lkml/2008/8/24/143 ] I must use a gpio0 quirk to get the speaker sound so i added a device hint: hint.hdac.0.config="gpio0" And I should fix the association between the headphone pin and the speaker. device hint: hint.hdac.0.cad0.nid21.config="as=4 seq=15" hdac0: HDA Driver Revision: 20090126_0126 hdac0: Reserved 0x4000 bytes for rid 0x10 type 3 at 0x9b500000 hdac0: [MPSAFE] hdac0: [ITHREAD] hdac0: HDA Config: gpio0 hdac0: Probing codec #0... hdac0: HDA Codec #0: Realtek ALC885 hdac0: HDA Codec ID: 0x10ec0885 hdac0: Vendor: 0x10ec hdac0: Device: 0x0885 hdac0: Revision: 0x01 hdac0: Stepping: 0x03 hdac0: PCI Subvendor: 0x00a0106b hdac0: Found audio FG nid=1 startnode=2 endnode=39 total=37 hdac0: hdac0: Processing audio FG cad=0 nid=1... hdac0: GPIO: 0x40000002 NumGPIO=2 NumGPO=0 NumGPI=0 GPIWake=0 GPIUnsol=1 hdac0: nid 20 0x90100140 as 4 seq 0 Speaker Fixed jack 0 loc 16 color Unknown misc 1 hdac0: nid 21 0x012b4050 as 5 seq 0 Headphones Jack jack 11 loc 1 color Green misc 0 [...] hdac0: Patched pins configuration: hdac0: nid 20 0x90100140 as 4 seq 0 Speaker Fixed jack 0 loc 16 color Unknown misc 1 hdac0: nid 21 0x012b404f as 4 seq 15 Headphones Jack jack 11 loc 1 color Now when i plug a headphone, the sound from the speaker is muted but i don't hear sound in the headphone. There is some sound but the level is very very very low. I think i have to add a ovref quirk somewhere or another quirk, but a quirk hint.hdac.0.config="gpio0 ovref" does not seem to do anything: hdac0: FG config/quirks: gpio0 forcestereo ivref50 ivref80 ivref100 ivref Why ovref is not listed? How to add a quirk 'ovref' or 'eapdinv', there is no example in the man page? files: - hda and pcm output: http://user.lamaiziere.net/patrick/keep/hda.txt http://user.lamaiziere.net/patrick/keep/hda-linux.svg The sound works fine under Linux, for information I add: - hda codec output from Linux(ubuntu-8/10) (ie /proc/asound/card*/codec*) http://user.lamaiziere.net/patrick/keep/hda-linux.txt - codecgraph output: http://user.lamaiziere.net/patrick/keep/hda-linux.svg (is it useful for you?) Any help will be very welcome, thanks. Regards.