From owner-freebsd-questions@freebsd.org Sun Feb 4 03:43:34 2018 Return-Path: Delivered-To: freebsd-questions@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 2352FEE3A4A for ; Sun, 4 Feb 2018 03:43:34 +0000 (UTC) (envelope-from erisianash@gmail.com) Received: from mail-vk0-x22d.google.com (mail-vk0-x22d.google.com [IPv6:2607:f8b0:400c:c05::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B25C76ACD2 for ; Sun, 4 Feb 2018 03:43:33 +0000 (UTC) (envelope-from erisianash@gmail.com) Received: by mail-vk0-x22d.google.com with SMTP id x203so15791574vkx.10 for ; Sat, 03 Feb 2018 19:43:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:user-agent:in-reply-to:references:mime-version :content-transfer-encoding:subject:to:from:message-id; bh=I/aVlYl6w+BX65RfiU53C/Yr/xlgzEpfWyMW158gHVo=; b=VNWH6O/LWGW3k1Kl+tdpaS+Pig1OhtH5RKL2M8DIQkBTgjHSpzOaf+QdzLjOeZeTSZ d/HcqIzuAO9oCjUY3vkF6oIbRg2x32UIjpcwsirmRVZ75tItwQKGjNU4+HvxXCGD3FR3 uss0BK7zQhSDrzxF4Hu2SZanQmi18uTsEJrf8SIW1hdE6O/fBGN2F1bTNRZqwC7Kmk2+ 4380EV7rpmMC8tqZMq3A/7IQm0Wvr3FqMf1eKCK56qgv80wNlmPRAlmOPS9YovbI5YBG 97uLaAVRT7oaKKXRp4VwF/IxaGBdveLA2XaoX1/ISy9rZpnkZF9cyujTEdzz0Gm9Fv+t dU4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:user-agent:in-reply-to:references :mime-version:content-transfer-encoding:subject:to:from:message-id; bh=I/aVlYl6w+BX65RfiU53C/Yr/xlgzEpfWyMW158gHVo=; b=Qx3R2FYXwTuDjrl+uJwTAuJEJjgcye3bTtxFnznAiTnEKlEZ9cSiSF0007mzMbgIpg q/jx/tj09ULz/DlHyVg5uthqc5dHLPOjbRQe1XVNmlMM6j7V74BER+gLUYKqchdaEzeS VpcyPSTrwpawg2fj8i245NAvUPEv/QnRrprbmKMWd8Mlq0TVJZ+l7cee/U5HEBlgjiAk oFfVnnvEWV/m/VccNaUaV2GwlI58PhHFDePL6rAl8kmluey6pmzfEia7gw1+HbZD8sef sBiz8P+//EaokolcmQq8o+hWkOUFhaSq5dPmRlGB38vTcLkPya8OGiRlCAOHWuZ5tc6J jldg== X-Gm-Message-State: AKwxytcwnzFTxpgQgS5Bkf+y7j8nKrYRL4QbjqMpmmVZJnjbbWwiy4ND mi/aC4TPqKTzF5NbNpeKmYHfIoJp X-Google-Smtp-Source: AH8x224VtbHZwY0wiT2gsoWxSxwpAcnrY8IOj5c+GI64xkerU6iBhK7MD8hlz0jAD4nQdny2JR0QaA== X-Received: by 10.31.196.131 with SMTP id u125mr31581960vkf.158.1517715812839; Sat, 03 Feb 2018 19:43:32 -0800 (PST) Received: from [192.168.2.139] (75-175-12-135.ptld.qwest.net. [75.175.12.135]) by smtp.gmail.com with ESMTPSA id a12sm741899uak.41.2018.02.03.19.43.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 03 Feb 2018 19:43:32 -0800 (PST) Date: Sat, 03 Feb 2018 19:43:28 -0800 User-Agent: K-9 Mail for Android In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: How to set default pcm device? To: freebsd-questions@freebsd.org,Christian Weisgerber From: Ashley Chase Message-ID: X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Feb 2018 03:43:34 -0000 Typing this on my phone=2E Sorry if the formatting isn't right=2E On February 3, 2018 12:44:30 PM PST, Christian Weisgerber wrote: >After boot, my /dev/sndstat looks like this: > >Installed devices: >pcm0: (play) >pcm1: (play/rec) default >pcm2: (play/rec) >pcm3: (play) >No devices installed from userspace=2E > >However, I would like the USB audio device, pcm3, to be the default >sound unit=2E How do I set this persistently across reboots? > >The traditional solution was to set hw=2Esnd=2Edefault_unit=3D3 in >/boot/loader=2Econf=2E That worked for FreeBSD 10=2Ex, but with 11=2Ex t= he >USB devices are attached very late and the boot loader setting >(which I still have) is effectively ignored=2E Loading the uaudio >module early with snd_uaudio_load=3DYES doesn't change this=2E Setting >hw=2Esnd=2Edefault_unit in /etc/sysctl=2Econf is unlikely to work either; >certainly it's a race=2E > hw=2Esnd=2Edefault_unit is actually a sysctl and should go in /etc/sysctl= =2Econf You night also consider setting hw=2Esnd=2Edefault_auto=3D2 to automatical= ly select the most recently attached device=2E This is documented in the sound(4) man page=2E >Do I need to define a devd(8) action for when uaudio attaches or >is there a better way? --=20 Ashley Chase