From owner-freebsd-current@freebsd.org Mon Oct 1 19:37:16 2018 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 A21E210A870D for ; Mon, 1 Oct 2018 19:37:16 +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 3CEB289AC4 for ; Mon, 1 Oct 2018 19:37:15 +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 1g740H-000PDV-OD; Mon, 01 Oct 2018 21:37:13 +0200 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=+x9go18L15+LTkBYtkK/UkIUU5aIkJVaItwOdIpsvR4=; b=GMj853ccrCoT+CiIR20XaqHylL HBYV0ZAHlQqbzidBXLjh1RWKQBgB7Mh8a15HIyI+k4p1XvguZAKtM3gavkjVedqHKldQ33fpIJgiq b7XJAxxsSnjmUbuyMB5ZXDB5704bBqXu60n5JXakatt6IzHmzpZXHk7M/j4N436UVW1Hy0oTdO/w1 6fjXmrxN4FVwgetpEcXEkow2ul6nOP9MHQzxaUFRdv2dkg5DLOUV8qPKxPLj7mHQ1JRyAR34f47QO jrnDAIcb5OlicZ1wFpy1nPYIfcq2LQI7+qn+jkVIdC9CKIVN4Po66yVBIomFCKRQwhE5CScKXszM9 jcmbMKzQ==; 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 1g740G-000Cxe-HK; Mon, 01 Oct 2018 21:37:12 +0200 Subject: Re: Sound issues with Dell Latitude 7490 (kabylake) To: Johannes Lundberg , freebsd-current References: From: Jakob Alvermark Message-ID: <85518f55-20a8-f534-7266-a9e847912afc@alvermark.net> Date: Mon, 1 Oct 2018 21:37:12 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.0.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.27 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, 01 Oct 2018 19:37:16 -0000 On 10/1/18 5:57 PM, Johannes Lundberg wrote: > Hi > > While sound work out of the box (with headphone switching) on the 1-2 year > older Latitude 7270, it does not on my new machine. > > The internal speaker works fine. If I plug in external speakers in the > headphone jack, sound still goes to the internal speaker while a very load > buzz comes from the external speakers. > > Do we have a solution for this? > > # cat /dev/sndstat > Installed devices: > pcm0: (play/rec) default > pcm1: (play) > pcm2: (play) > No devices installed from userspace. > > # sysctl hw.snd > hw.snd.maxautovchans: 16 > hw.snd.default_unit: 0 > hw.snd.version: 2009061500/amd64 > hw.snd.default_auto: 1 > hw.snd.verbose: 0 > hw.snd.vpc_mixer_bypass: 1 > hw.snd.feeder_rate_quality: 1 > hw.snd.feeder_rate_round: 25 > hw.snd.feeder_rate_max: 2016000 > hw.snd.feeder_rate_min: 1 > hw.snd.feeder_rate_polyphase_max: 183040 > hw.snd.feeder_rate_presets: 100:8:0.85 100:36:0.92 100:164:0.97 > hw.snd.feeder_eq_exact_rate: 0 > hw.snd.feeder_eq_presets: > PEQ:16000,0.2500,62,0.2500:-9,9,1.0:44100,48000,88200,96000,176400,192000 > hw.snd.basename_clone: 1 > hw.snd.compat_linux_mmap: 0 > hw.snd.syncdelay: -1 > hw.snd.usefrags: 0 > hw.snd.vpc_reset: 0 > hw.snd.vpc_0db: 45 > hw.snd.vpc_autoreset: 1 > hw.snd.timeout: 5 > hw.snd.latency_profile: 1 > hw.snd.latency: 5 > hw.snd.report_soft_matrix: 1 > hw.snd.report_soft_formats: 1 > > # sysctl dev.pcm > dev.pcm.2.bitperfect: 0 > dev.pcm.2.buffersize: 65536 > dev.pcm.2.play.vchanformat: s16le:2.0 > dev.pcm.2.play.vchanrate: 48000 > dev.pcm.2.play.vchanmode: passthrough > dev.pcm.2.play.vchans: 1 > dev.pcm.2.play.32bit: 24 > dev.pcm.2.%parent: hdaa1 > dev.pcm.2.%pnpinfo: > dev.pcm.2.%location: nid=3 > dev.pcm.2.%driver: pcm > dev.pcm.2.%desc: Intel Kabylake (HDMI/DP 8ch) > dev.pcm.1.bitperfect: 0 > dev.pcm.1.buffersize: 65536 > dev.pcm.1.play.vchanformat: s16le:2.0 > dev.pcm.1.play.vchanrate: 48000 > dev.pcm.1.play.vchanmode: fixed > dev.pcm.1.play.vchans: 1 > dev.pcm.1.play.32bit: 24 > dev.pcm.1.%parent: hdaa0 > dev.pcm.1.%pnpinfo: > dev.pcm.1.%location: nid=33 > dev.pcm.1.%driver: pcm > dev.pcm.1.%desc: Realtek ALC256 (Front Analog Headphones) > dev.pcm.0.bitperfect: 0 > dev.pcm.0.buffersize: 65536 > dev.pcm.0.rec.vchanformat: s16le:2.0 > dev.pcm.0.rec.vchanrate: 48000 > dev.pcm.0.rec.vchanmode: fixed > dev.pcm.0.rec.vchans: 1 > dev.pcm.0.rec.autosrc: 2 > dev.pcm.0.rec.32bit: 24 > dev.pcm.0.play.vchanformat: s16le:2.0 > dev.pcm.0.play.vchanrate: 48000 > dev.pcm.0.play.vchanmode: fixed > dev.pcm.0.play.vchans: 2 > dev.pcm.0.play.32bit: 24 > dev.pcm.0.%parent: hdaa0 > dev.pcm.0.%pnpinfo: > dev.pcm.0.%location: nid=20,18 > dev.pcm.0.%driver: pcm > dev.pcm.0.%desc: Realtek ALC256 (Internal Analog) > dev.pcm.%parent: You could try sysctl dev.hdaa.0.nid33_config="as=1 seq=15 device=Headphones" sysctl dev.hdaa.0.reconfig=1 It should result in you having only one pcm device for the two outputs and it should switch from internal to external when you plug in the external speakers and vice versa. To make it permanent put 'hint.hdaa.0.nid33.config="as=1 seq=15 device=Headphones"' in your loader.conf The loud buzz is a bit worrying, it could be related to the problem I have been having, where I got strange sound when using headphones on my laptop. I have worked around it by patching the sound driver, I have kept my local patch for years. Jakob