From owner-freebsd-current@freebsd.org Mon Mar 18 15:54:29 2019 Return-Path: Delivered-To: freebsd-current@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 6F93C1544C37 for ; Mon, 18 Mar 2019 15:54:29 +0000 (UTC) (envelope-from jakob@alvermark.net) Received: from out.alvermark.net (out.alvermark.net [185.34.136.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D3D148EEE0; Mon, 18 Mar 2019 15:54:27 +0000 (UTC) (envelope-from jakob@alvermark.net) Received: from c-42bc70d5.06-431-73746f70.bbcust.telenor.se ([213.112.188.66] helo=mail.alvermark.net) by out.alvermark.net with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91 (FreeBSD)) (envelope-from ) id 1h5uah-000Nit-2O; Mon, 18 Mar 2019 16:54:19 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=alvermark.net; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:To:Subject:Sender:Reply-To:Cc: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=K/m2VYOSWEVU5mrRc579d999qKXoLyWRNMwcPWlkywk=; b=nnitxusEwLNlBW1/GUMqh6rFbg dk81DUJILEooQ+O/Cck6ik5CsHyZEvL5UQPMBV52FNJEGG/m+g7R/WjwRyVC8FNx5vyl8cbgpPvhB Msazm/tu6UFRyxdOiZp6Omp0xv6lMeI8CucECyy+HmEFjG09o98W6PUAsZ76saOlo6cG/JyBsP4kS GFRLiC6D3KUzIai6qb4LaABRxVvIk5bNFGouoYrjhNsXUHsRr4kbZOplePtWFSGTRxw1CRosCmSrG 2jYhCnZO6HgScuGgdLk434hRzvhv1PWN8cSm7qmhKE1FaZkkV7FnwquRig4xChxLW9s+pp+t0lqMG 9+Nwtu5w==; Received: from [192.168.67.33] by mail.alvermark.net with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.91 (FreeBSD)) (envelope-from ) id 1h5uaH-00092l-Ce; Mon, 18 Mar 2019 16:53:53 +0100 Subject: Re: Use mic from headphone jack on freebsd laptop? To: Johannes Lundberg , FreeBSD Current References: <3591969e-2a20-ebf6-2cc4-462090afbdb0@FreeBSD.org> From: Jakob Alvermark Message-ID: <9ac32319-41a3-3a1a-3662-c75a6340d0ac@alvermark.net> Date: Mon, 18 Mar 2019 16:53:52 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.5.3 MIME-Version: 1.0 In-Reply-To: <3591969e-2a20-ebf6-2cc4-462090afbdb0@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Rspamd-Queue-Id: D3D148EEE0 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=alvermark.net header.s=x header.b=nnitxusE; spf=pass (mx1.freebsd.org: domain of jakob@alvermark.net designates 185.34.136.138 as permitted sender) smtp.mailfrom=jakob@alvermark.net X-Spamd-Result: default: False [-1.18 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[alvermark.net:s=x]; NEURAL_HAM_MEDIUM(-0.93)[-0.931,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:185.34.136.138]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(0.01)[country: IT(0.05)]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; NEURAL_SPAM_SHORT(0.25)[0.249,0]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[alvermark.net:+]; RCPT_COUNT_TWO(0.00)[2]; MX_GOOD(-0.01)[alvermark.net]; FROM_EQ_ENVFROM(0.00)[]; SUBJECT_ENDS_QUESTION(1.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:34971, ipnet:185.34.136.0/24, country:IT]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Mar 2019 15:54:29 -0000 Hi Johannes, I have been wanting the exact same thing on my laptop, so I have been digging around in the hda code. I have got to the point where I can use the headset mic, but I have to manually switch from the internal one. There is no configuration magic, I had to patch the driver. It seems nearly impossible to find docs on Realtek codecs, I have looked at what Linux does in their driver. They change some mysterious registers in the codec, so I my patch just does the same. Which codec do you have? I have the ALC283 ('cat /dev/sndstat' should tell you) Jakob On 3/18/19 4:02 PM, Johannes Lundberg wrote: > Hi > > On my Dell laptop the output audio switches to the headphones > automatically when plugged in, however, the same does not seem to be > true for the mic. Is there any configuration magic that can be done to > use the headphone mic instead of the internal one? > > Here's pin config: > > hdaa0: Dumping AFG pins: > hdaa0: nid   0x    as seq device       conn  jack    loc        color   misc > hdaa0: 18 90a60140 4  0  Mic           Fixed Digital Internal   Unknown 1 > hdaa0:     Caps: IN > hdaa0: 19 40000000 0  0  Line-out      None  Unknown 0x00       Unknown > 0 DISA > hdaa0:     Caps: IN > hdaa0: 20 90170110 1  0  Speaker       Fixed Analog  Internal   Unknown 1 > hdaa0:     Caps:    OUT    EAPD      Sense: 0x00000000 (disconnected) > hdaa0: 24 411111f0 15 0  Speaker       None  1/8     Rear       Black > 1 DISA > hdaa0:     Caps: IN             VREF Sense: 0x00000000 (disconnected) > hdaa0: 25 411111f0 15 0  Speaker       None  1/8     Rear       Black > 1 DISA > hdaa0:     Caps: IN             VREF Sense: 0x80000000 (connected) > hdaa0: 26 411111f0 15 0  Speaker       None  1/8     Rear       Black > 1 DISA > hdaa0:     Caps: IN             VREF Sense: 0x00000000 (disconnected) > hdaa0: 27 411111f0 15 0  Speaker       None  1/8     Rear       Black > 1 DISA > hdaa0:     Caps: IN OUT    EAPD VREF Sense: 0x00000000 (disconnected) > hdaa0: 30 421212f2 15 2  Speaker       None  1/4     Front      Black > 2 DISA > hdaa0:     Caps:    OUT              Sense: 0x00000000 (disconnected) > hdaa0: 33 0221101f 1  15 Headphones    Jack  1/8     Front      Black   0 > hdaa0:     Caps:    OUT HP EAPD      Sense: 0x80000000 (connected) > hdaa0: NumGPIO=3 NumGPO=0 NumGPI=0 GPIWake=0 GPIUnsol=1 > hdaa0:  GPIO0: disabled > hdaa0:  GPIO1: disabled > hdaa0:  GPIO2: disabled > hdaa1: Dumping AFG pins: > hdaa1: nid   0x    as seq device       conn  jack    loc        color   misc > hdaa1:  3 18560010 1  0  Digital-out   Jack  Digital 0x18       Unknown 0 > hdaa1:     Caps:    OUT             hdac0: Command timeout on address 2 >  Sense: 0xffffffff (connected, ELD valid) > hdaa1: NumGPIO=0 NumGPO=0 NumGPI=0 GPIWake=0 GPIUnsol=0 > > And in /boot/loader.conf I have this (don't remember why I put it there > or if I need it - it might have been copied over from previous laptop) > > hint.hdaa.0.nid33.config="as=1 seq=15 device=Headphones" > > I'm assuming here that the headphone jack supports mic - it's a 2018 > laptop after all. > > Cheers > > /Johannes > > > _______________________________________________ > freebsd-current@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"