From owner-freebsd-multimedia@freebsd.org Fri Jul 6 18:24:39 2018 Return-Path: Delivered-To: freebsd-multimedia@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 ADE8E1042C23 for ; Fri, 6 Jul 2018 18:24:38 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 40A678FDB0 for ; Fri, 6 Jul 2018 18:24:38 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id F24A31042C22; Fri, 6 Jul 2018 18:24:37 +0000 (UTC) Delivered-To: multimedia@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 CFC1F1042C21 for ; Fri, 6 Jul 2018 18:24:37 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: from mail-vk0-x229.google.com (mail-vk0-x229.google.com [IPv6:2607:f8b0:400c:c05::229]) (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 6CF988FDAF for ; Fri, 6 Jul 2018 18:24:37 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: by mail-vk0-x229.google.com with SMTP id s23-v6so7311359vks.7 for ; Fri, 06 Jul 2018 11:24:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=qw/41/SiLmv4vtRsygYNbpAm+fBWUbU2l02wE/mahbs=; b=LsktD61K47/gOK3HS75eXLvqj8dDR14wJZepM3x3xXpJjvZbiz60UQySrLWJVVhd7I acLu4KRDNYobG4bY4iqqaghUey0dimxG2XdEAaG1PI8dvBkGeoJrlABFuWqVlwA3ZgJu ZWaDEt7S2m6FPghSBTmM+mmDuGXYQJfDcbw4vI6Qi5ov9X/NXQQtTpL987hHX0Ksn55B DtDwRLH07Mb2Rz/xJs1PegW5EcRaT/CFvZ1clOrrlJqMyI5WykV8gPBFVsl0PKxHInOv aA7TGLjlmVHXJrtD7GlE29BG0WQHEmauPMSFRGVSPtX9Fi+0R2iacUYKsGZQ7exFzUJ2 FChg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=qw/41/SiLmv4vtRsygYNbpAm+fBWUbU2l02wE/mahbs=; b=JbQDNL8nitxQyNqpspAzOst3poQEWeQmR2URu40PsFLQe+IzMK419YQ9DlPaNvkgfu FO1CcYra4rj+C69Z5EIq7v5nOJ16wezXiU6Ane4p1Z4iW43nOg9Z8Y0yBWL2P0/gfuA+ czWeITH4ZzkaOBLuTNr+coUUJiiUMmAu9vCe0TeKmc1qf1tf10ScXRggKKK4XqrlaBkf bsd1IyNyfTpKhllOWF1FlnBnXc7GCNXvowsUhxH62Tevlb6+kvhYdUQOi9OOKRqDhjm8 1JxGz8KkLvbQozVfr8sLj/OI8kXcvqvwJ5JTHCPvLzcmfUAQ+P79V/Vd0VEdoLxekB+n m5qA== X-Gm-Message-State: APt69E0Qd2qbFeJzw4s2YxfX4rF7A5FtCgmXOZWBf3id6sjAuWK9c9Id iZubFmKJbKQVi9IMJ3TGBS0sIioTkvEy+xuw5enkujpB X-Google-Smtp-Source: AAOMgpc3R52tpPJp8+dzz55fPSrbtWX+Dh1OI/BfRzFJXpCcruaqunBPZCFv/5N3pEDT0UTgKtpDfDb/dOE2HMyPsOA= X-Received: by 2002:a1f:b258:: with SMTP id b85-v6mr5891231vkf.155.1530901476500; Fri, 06 Jul 2018 11:24:36 -0700 (PDT) MIME-Version: 1.0 Sender: kob6558@gmail.com Received: by 2002:a67:8f07:0:0:0:0:0 with HTTP; Fri, 6 Jul 2018 11:24:35 -0700 (PDT) In-Reply-To: <04571f73-7c5b-ec4e-ced1-dfbf723d7378@selasky.org> References: <07c88807-a86b-4c33-c418-e0e15ddc4f80@selasky.org> <04571f73-7c5b-ec4e-ced1-dfbf723d7378@selasky.org> From: Kevin Oberman Date: Fri, 6 Jul 2018 11:24:35 -0700 X-Google-Sender-Auth: -Fl2ci4hOREP3Ari3_4wuUZM1Eo Message-ID: Subject: Re: Audio recording from USB To: Hans Petter Selasky Cc: multimedia@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jul 2018 18:24:39 -0000 On Fri, Jul 6, 2018 at 12:40 AM, Hans Petter Selasky wrote: > On 07/06/18 02:00, Kevin Oberman wrote: > >> Oops! Sorry of hte empty message made it through. >> >> On Thu, Jul 5, 2018 at 12:47 AM, Hans Petter Selasky >> wrote: >> >> On 07/04/18 23:41, Kevin Oberman wrote: >>> >>> I have an Audio-technia turntable with USB output and I want to use >>>> audacity to record from it. I have read the sound, mixer, and snd_uaudio >>>> man pages, but am still unable to get the configuration correct. sndstat >>>> shows the device (pcm4) but mixer only lists pcm0, the Conexant CX20590, >>>> which is marked as default in sndstat. >>>> >>>> Messages on connection: >>>> uaudio0 on uhub3 >>>> uaudio0: >>> rev >>>> 2.00/1.00, addr 3> on usbus1 >>>> uaudio0: Play: 48000 Hz, 2 ch, 16-bit S-LE PCM format, 2x8ms buffer. >>>> uaudio0: Play: 44100 Hz, 2 ch, 16-bit S-LE PCM format, 2x8ms buffer. >>>> uaudio0: Play: 32000 Hz, 2 ch, 16-bit S-LE PCM format, 2x8ms buffer. >>>> uaudio0: Record: 48000 Hz, 2 ch, 16-bit S-LE PCM format, 2x8ms buffer. >>>> uaudio0: Record: 44100 Hz, 2 ch, 16-bit S-LE PCM format, 2x8ms buffer. >>>> uaudio0: Record: 32000 Hz, 2 ch, 16-bit S-LE PCM format, 2x8ms buffer. >>>> uaudio0: Record: 22050 Hz, 2 ch, 16-bit S-LE PCM format, 2x8ms buffer. >>>> uaudio0: Record: 16000 Hz, 2 ch, 16-bit S-LE PCM format, 2x8ms buffer. >>>> uaudio0: Record: 11025 Hz, 2 ch, 16-bit S-LE PCM format, 2x8ms buffer. >>>> uaudio0: No MIDI sequencer. >>>> pcm4: on uaudio0 >>>> uaudio0: HID volume keys found. >>>> >>>> Installed devices: >>>> pcm0: (play/rec) default >>>> pcm1: (play) >>>> pcm2: (play) >>>> pcm3: (play) >>>> pcm4: (play/rec) >>>> >>>> mixer -f /dev/mixer4 shows: >>>> Mixer vol is currently set to 75:75 >>>> Mixer pcm is currently set to 75:75 >>>> No line or mic. >>>> >>>> I tried "cat /dev/dsp4.0" and got the expected stream of "junk" that >>>> looks >>>> like it is getting data from the turntable. "junk" changes when I play >>>> something, so I think the hardware is all working to some degree. >>>> >>>> Can anyone suggest where to go from here? >>>> >>>> >>> Did you try: >>> sysctl -a hw.snd.default_unit=4 >>> >>> --HPS >>> >> >> >> Yes, but... >> >>> mixer >>> >> Mixer vol is currently set to 75:75 >> Mixer pcm is currently set to 75:75 >> >> So mixer seems to "see" mixer4, but still only shows vol and pcm. No input >> device. Bringing up the mate sound preferences, I only see the on-board >> mic for input, but see the USB device for output. I'm a bit baffled as to >> why the mixer fails to any USB input even though the connection message >> clearly shows that capability. >> > > The mixer might not always have a node for input. You can try to dump the > sysctl tree, grepping for pcm. There might be some hidden ones under .mixer > . > > --HPS > I see: dev.pcm.4.rec.vchanformat: s16le:2.0 dev.pcm.4.rec.vchanrate: 48000 dev.pcm.4.rec.vchanmode: fixed dev.pcm.4.rec.vchans: 1 There is no indication that a "line" or any mixer input (rec) is created. The only .mixer values are for play entries which exist in the CODEC chip, but go nowhere: dev.pcm.4.mixer.mute_1.desc: USB AUDIO CODEC dev.pcm.4.mixer.mute_1.max: 1 dev.pcm.4.mixer.mute_1.min: 0 dev.pcm.4.mixer.mute_1.val: 0 dev.pcm.4.mixer.vol_0_1.desc: USB AUDIO CODEC dev.pcm.4.mixer.vol_0_1.max: 0 dev.pcm.4.mixer.vol_0_1.min: -16384 dev.pcm.4.mixer.vol_0_1.val: -7261 dev.pcm.4.mixer.vol_0_0.desc: USB AUDIO CODEC dev.pcm.4.mixer.vol_0_0.max: 0 dev.pcm.4.mixer.vol_0_0.min: -16384 dev.pcm.4.mixer.vol_0_0.val: -7261 I am not familiar with the sound subsystem design, so I have no idea what part should be doing this. In a slightly unrelated issue, is any way to get the uaudio device to disconnect when I unplug the device without killing Mate? The man page describes this. I get continual messages: pcm4: Waiting for sound application to exit! pcm4: unregister: mixer busy The mate-settings-daemon and mate-volume-control-applet programs keep connections to uaudio open. I can kill the volume applet, but killing the settings-daemon just results it a new settings-daemon starting and the device not being desconnected. Restarting Mate does result in the device being disconnected. Just an annoyance, but one I'd prefer to live without. -- Kevin Oberman, Part time kid herder and retired Network Engineer E-mail: rkoberman@gmail.com PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683