From owner-freebsd-multimedia@FreeBSD.ORG Sat Jan 31 08:39:47 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 36B241065672 for ; Sat, 31 Jan 2009 08:39:47 +0000 (UTC) (envelope-from mav@mavhome.dp.ua) Received: from cmail.optima.ua (cmail.optima.ua [195.248.191.121]) by mx1.freebsd.org (Postfix) with ESMTP id 7686E8FC1E for ; Sat, 31 Jan 2009 08:39:46 +0000 (UTC) (envelope-from mav@mavhome.dp.ua) X-Spam-Flag: SKIP X-Spam-Yversion: Spamooborona-2.1.0 Received: from [212.86.226.226] (account mav@alkar.net HELO mavbook.mavhome.dp.ua) by cmail.optima.ua (CommuniGate Pro SMTP 5.2.9) with ESMTPSA id 233030760; Sat, 31 Jan 2009 10:39:45 +0200 Message-ID: <49840E58.9050303@mavhome.dp.ua> Date: Sat, 31 Jan 2009 10:39:52 +0200 From: Alexander Motin User-Agent: Thunderbird 2.0.0.19 (X11/20090118) MIME-Version: 1.0 To: =?ISO-8859-1?Q?Patrick_Lamaizi=E8re?= References: <1233372205.00068713.1233358803@10.7.7.3> In-Reply-To: <1233372205.00068713.1233358803@10.7.7.3> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: freebsd-multimedia@freebsd.org Subject: Re: [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: Sat, 31 Jan 2009 08:39:47 -0000 Patrick Lamaizière wrote: > 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? There was a bug in this string parsing which I have just fixed in CURRENT. eapdinv will be ineffective for this codec, as there is no EAPD controls reported by it. Actually I have never seen that ovref do something, but you may try it, Linux seems doing it for several macbooks. > 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. If you are not doing redirection, but instead just playing to headphones via different pcm device, does they work fine? -- Alexander Motin