From owner-freebsd-multimedia@FreeBSD.ORG Wed Aug 13 14:18:53 2008 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 C91611065685; Wed, 13 Aug 2008 14:18:53 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from falcon.cybervisiontech.com (falcon.cybervisiontech.com [217.20.163.9]) by mx1.freebsd.org (Postfix) with ESMTP id 547EB8FC1F; Wed, 13 Aug 2008 14:18:53 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from localhost (localhost [127.0.0.1]) by falcon.cybervisiontech.com (Postfix) with ESMTP id 38AD174417F; Wed, 13 Aug 2008 17:18:52 +0300 (EEST) X-Virus-Scanned: Debian amavisd-new at falcon.cybervisiontech.com Received: from falcon.cybervisiontech.com ([127.0.0.1]) by localhost (falcon.cybervisiontech.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tbFCjiQxFzpy; Wed, 13 Aug 2008 17:18:52 +0300 (EEST) Received: from [10.2.1.87] (gateway.cybervisiontech.com.ua [91.198.50.114]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by falcon.cybervisiontech.com (Postfix) with ESMTP id B377E744173; Wed, 13 Aug 2008 17:18:51 +0300 (EEST) Message-ID: <48A2ED4A.6060606@icyb.net.ua> Date: Wed, 13 Aug 2008 17:18:50 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.16 (X11/20080805) MIME-Version: 1.0 To: Alexander Motin References: <53a1e0710808130628t451c5e87n28adb7d01b03dfd4@mail.gmail.com> <48A2E5DA.4060203@FreeBSD.org> <48A2E8D6.10806@icyb.net.ua> In-Reply-To: <48A2E8D6.10806@icyb.net.ua> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-multimedia@FreeBSD.org Subject: Re: RFC: massive snd_hda driver update to better conform UAA 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: Wed, 13 Aug 2008 14:18:53 -0000 on 13/08/2008 16:59 Andriy Gapon said the following: > Alexander, > > I've tried a slightly tweaked version of your releng_7 patch on 6.3. > It seems that with your patch recording stopped working for me, but > everything else is OK. > > From (non-verbose) dmesg: > hdac0: mem > 0xfe024000-0xfe027fff irq 22 at device 16.1 on pci0 > hdac0: > hdac0: > hdac0: hdac_widget_connection_parse: nid=18 WARNING: zero cnid entnum=4 > j=2 index=0 entries=8 found=2 res=0x21002211 > hdac0: hdac_audio_as_parse: Pin 28 has wrong direction for association > 1! Disabling association. > hdac0: hdac_audio_as_parse: Pin 29 has wrong direction for association > 1! Disabling association. > pcm0: on hdac0 > pcm1: on hdac0 Some info from verbose dmesg: nid 26 0x02214021 as 2 seq 1 Headphones Jack jack 1 loc 2 color Green misc 0 nid 27 0x01014011 as 1 seq 1 Line out Jack jack 1 loc 1 color Green misc 0 nid 28 0x01013012 as 1 seq 2 Line out Jack jack 1 loc 1 color Blue misc 0 Patching pin config nid=28 0x01013012 -> 0x01813012 nid 29 0x01019015 as 1 seq 5 Line out Jack jack 1 loc 1 color Pink misc 0 Patching pin config nid=29 0x01019015 -> 0x01a19015 nid 30 0x501700f0 as 15 seq 0 Speaker None jack 7 loc 16 color Unknown misc 0 nid 31 0x02a190f0 as 15 seq 0 Mic in Jack jack 1 loc 2 color Pink misc 0 nid 32 0x018130f0 as 15 seq 0 Line in Jack jack 1 loc 1 color Blue misc 0 nid 33 0x509700f0 as 15 seq 0 AUX None jack 7 loc 16 color Unknown misc 0 nid 34 0x993310f0 as 15 seq 0 CD Fixed jack 3 loc 25 color Black misc 0 nid 35 0x50b700f0 as 15 seq 0 Telephony None jack 7 loc 16 color Unknown misc 0 nid 36 0x90f700f0 as 15 seq 0 Other Fixed jack 7 loc 16 color Unknown misc 0 nid 37 0x014510f0 as 15 seq 0 SPDIF out Jack jack 5 loc 1 color Black misc 0 Parsing Ctls... Parsing vendor patch... Patched pins configuration: nid 26 0x02214021 as 2 seq 1 Headphones Jack jack 1 loc 2 color Green misc 0 nid 27 0x01014011 as 1 seq 1 Line out Jack jack 1 loc 1 color Green misc 0 nid 28 0x01813012 as 1 seq 2 Line in Jack jack 1 loc 1 color Blue misc 0 nid 29 0x01a19015 as 1 seq 5 Mic in Jack jack 1 loc 1 color Pink misc 0 nid 30 0x501700f0 as 15 seq 0 Speaker None jack 7 loc 16 color Unknown misc 0 [DISABLED] nid 31 0x02a190f0 as 15 seq 0 Mic in Jack jack 1 loc 2 color Pink misc 0 nid 32 0x018130f0 as 15 seq 0 Line in Jack jack 1 loc 1 color Blue misc 0 nid 33 0x509700f0 as 15 seq 0 AUX None jack 7 loc 16 color Unknown misc 0 [DISABLED] nid 34 0x993310f0 as 15 seq 0 CD Fixed jack 3 loc 25 color Black misc 0 nid 35 0x50b700f0 as 15 seq 0 Telephony None jack 7 loc 16 color Unknown misc 0 [DISABLED] nid 36 0x90f700f0 as 15 seq 0 Other Fixed jack 7 loc 16 color Unknown misc 0 nid 37 0x014510f0 as 15 seq 0 SPDIF out Jack jack 5 loc 1 color Black misc 0 Parsing pin associations... hdac_audio_as_parse: Pin 28 has wrong direction for association 1! Disabling association. hdac_audio_as_parse: Pin 29 has wrong direction for association 1! Disabling association. 7 associations found Association 1 out (disabled): Pin nid=27 seq=1 Pin nid=28 seq=2 Pin nid=29 seq=5 > I can see that current (non-patched) code has the following quirks for > the above two pins with my codec and my subvendor (ASUS M2NPV-MX > motherboard): > > } else if (id == HDA_CODEC_AD1986A && > (sc->pci_subvendor == ASUS_M2NPVMX_SUBVENDOR || > sc->pci_subvendor == ASUS_A8NVMCSM_SUBVENDOR)) { > switch (nid) { > case 28: /* LINE */ > config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK; > config |= HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN; > break; > case 29: /* MIC */ > config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK; > config |= HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN; > break; > default: > break; > } > } The above code is still there after the patch, but the following is gone: case HDA_CODEC_AD1986A: ... if (subvendor == ASUS_M2NPVMX_SUBVENDOR || subvendor == ASUS_A8NVMCSM_SUBVENDOR) { /* nid 28 is mic, nid 29 is line-in */ w = hdac_widget_get(devinfo, 15); if (w != NULL) w->selconn = 2; w = hdac_widget_get(devinfo, 16); if (w != NULL) w->selconn = 1; -- Andriy Gapon