From owner-freebsd-multimedia@freebsd.org Fri Oct 20 16:19:01 2017 Return-Path: Delivered-To: freebsd-multimedia@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 88A12E39EBF for ; Fri, 20 Oct 2017 16:19:01 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (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 3AAA981614 for ; Fri, 20 Oct 2017 16:19:01 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.128.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id A7092260117; Fri, 20 Oct 2017 18:18:58 +0200 (CEST) Subject: Re: Advice for audio recording To: Michael Reifenberger Cc: freebsd-multimedia@freebsd.org References: <20171020173704.Horde.jj_YkUyt6oyqr6Lqy0qwVD-@mail.eeeit.de> From: Hans Petter Selasky Message-ID: <7d047a4d-ea24-c97d-a6a9-8525f22f57b7@selasky.org> Date: Fri, 20 Oct 2017 18:16:19 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20171020173704.Horde.jj_YkUyt6oyqr6Lqy0qwVD-@mail.eeeit.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Oct 2017 16:19:01 -0000 On 10/20/17 17:37, Michael Reifenberger wrote: > > Hi, > I want to digitize some of my good-old records in 24bit/96khz FLAC. > For this I found two nice gadgets which play together: > > An 24bit/192khz ADC (AD24QS): > http://beis.de/Elektronik/ADDA24QS/ADDA24QS.html > An USBAUDIO 2.0 compatible digital to USB converter (DA2USB): > http://beis.de/Elektronik/DA2USB/DA2USB.html >   (Its a recording-only device) > > After setting the AD24QS to 96khz professional mode and connecting the > DA2USB to the computer, > on FreeBSD-11-stable (r322118) the DA2USB device is found as: > > ugen0.6: at usbus0 > uaudio0 on uhub0 > uaudio0: 11> on usbus0 > uaudio0: No playback. > uaudio0: Record: 96000 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer. > uaudio0: No MIDI sequencer. > pcm4: on uaudio0 > uaudio0: No HID volume keys found. > > /dev/dsp4.0 gets created. > > (zb3)(root) # sysctl -a | grep pcm.4 > dev.pcm.4.feedback_rate: 0 > dev.pcm.4.bitperfect: 0 > dev.pcm.4.buffersize: 0 > dev.pcm.4.rec.vchanformat: s16le:2.0 > dev.pcm.4.rec.vchanrate: 96000 > dev.pcm.4.rec.vchanmode: fixed > dev.pcm.4.rec.vchans: 1 > dev.pcm.4.hwvol_mixer: vol > dev.pcm.4.hwvol_step: 5 > dev.pcm.4.%parent: uaudio0 > dev.pcm.4.%pnpinfo: > dev.pcm.4.%location: > dev.pcm.4.%driver: pcm > dev.pcm.4.%desc: USB audio > > (Hmm, why dev.pcm.4.rec.vchanformat: s16le:2.0 , shouldn't it be > s24le:2.0?) > > But how to proceed further? > (Preferred would be transcoding from the command line) > > In audacity when trying to record from dsp4 in (24bit-PCM/96000hz) I get: > A popup: > ... > Error opening sound device. Try changing the audio host, recording > device and the project sample rate. > ... > > STDERR: > ... > Expression 'ioctl( component->fd, streamMode == StreamMode_In ? > SNDCTL_DSP_GETISPACE : SNDCTL_DSP_GETOSPACE, &bufInfo )' failed in > 'src/hostapi/oss/pa_unix_oss.c', line: 1061 > Expression 'PaOssStreamComponent_Configure( component, sampleRate, > framesPerBuffer, StreamMode_Out, master )' failed in > 'src/hostapi/oss/pa_unix_oss.c', line: 1145 > Expression 'PaOssStream_Configure( stream, sampleRate, framesPerBuffer, > &inLatency, &outLatency )' failed in 'src/hostapi/oss/pa_unix_oss.c', > line: 1251 > Expression 'ioctl( component->fd, streamMode == StreamMode_In ? > SNDCTL_DSP_GETISPACE : SNDCTL_DSP_GETOSPACE, &bufInfo )' failed in > 'src/hostapi/oss/pa_unix_oss.c', line: 1061 > Expression 'PaOssStreamComponent_Configure( component, sampleRate, > framesPerBuffer, StreamMode_Out, master )' failed in > 'src/hostapi/oss/pa_unix_oss.c', line: 1145 > Expression 'PaOssStream_Configure( stream, sampleRate, framesPerBuffer, > &inLatency, &outLatency )' failed in 'src/hostapi/oss/pa_unix_oss.c', > line: 1251 > ... > > And how to transcode on the command-line? Hi, virtual_oss in /usr/ports/audio/virtual_oss lets you stream the DSP device straight into a .wav file using "dd" and the command line. Not sure if this is what you want. Also there is something called "sox" which is the swiss army knife for resampling and changing formats from the command line. --HPS