From nobody Sat Oct 23 08:57:06 2021 X-Original-To: freebsd-multimedia@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 93FDD181E20B for ; Sat, 23 Oct 2021 08:57:25 +0000 (UTC) (envelope-from webplication@gmail.com) Received: from mail-il1-x12f.google.com (mail-il1-x12f.google.com [IPv6:2607:f8b0:4864:20::12f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hbw8N4HZTz3rCd for ; Sat, 23 Oct 2021 08:57:24 +0000 (UTC) (envelope-from webplication@gmail.com) Received: by mail-il1-x12f.google.com with SMTP id w10so6803305ilc.13 for ; Sat, 23 Oct 2021 01:57:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=x6DS5BUXsjmf9l9q+BwzTvkXWDY2mAjEC4h/TkJDjRk=; b=NusLfjaRJJExXzb7BZxaEy/djJ2EIMc/EklsmiTtz20OCeDhc4kYnB18UpkH7Hq/zM kgA5uxZLmlNxLVhmvkVeXW6SCfxYNC7CB4RHDvR/29hBFQKIeCN86JnI9ZCIZfSxSUPo fTo+tMV253hLAecBgqKDMRcT3tAUe38I51O0JP/SiWPdzGExPuVNggdJtGOUvafdWjjz m9H+LtZFjaQDQ/z+WAptWQDsC7KiU5Ib6suE7uWw4QMKedTSgjd/C3gnpGW3gg2ij/25 lnoHR10mywUiEaS89PgUuWVJ6Ts7QPfAK60KW6WA1Odj65197FSsBSqCoGAs2iIDNILG LBFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=x6DS5BUXsjmf9l9q+BwzTvkXWDY2mAjEC4h/TkJDjRk=; b=O3270sfWm/2Blr3Trjp8FppqSSUxQE7/jWaT75CtQh0Gpf+sNrtNzkxHfBomAjbpBU CeMD3f52J7IM55yMcKK0185OsjkYoUWo4HUl1fpZHJJQJmANio68sH6740j6ss66oIt1 29YgtDQg3ZBO6ci85vVrAjAIeLwYwqLkMPzBNw2gvAsAYgRzvfqfTXzFvmoUPp19dmxg lZpKtWJr8XeONL8u9MMF0C6rItsoPOuIttROtqm8zNayg1pB3xWNohdH7yt8aQbSvZNK 97UcWTD15iqb6RTOr5HFgmPW00/NTonq1hmxLiWsZHz5QzNeFjzzo0I3psce1OQh25Xg cp8Q== X-Gm-Message-State: AOAM533XAnhbEYyIPUWNCda56rN79vH3Rheiya+LfY9zosZWTwy+adSw dZtuvZaZ0gdmiYhoO/G18CBkO15XEM6EUYcSP0k7rRdXqbVNXw== X-Google-Smtp-Source: ABdhPJz+vS3bH9Kl0EkgEQ0snMu9B083KnfXLvJM7AgVz2A/ER8M5dEKsarFBJlxceTB84UsCIbr7EYqEd+A094JxiE= X-Received: by 2002:a05:6e02:1c05:: with SMTP id l5mr3009937ilh.7.1634979438324; Sat, 23 Oct 2021 01:57:18 -0700 (PDT) List-Id: Multimedia discussions List-Archive: https://lists.freebsd.org/archives/freebsd-multimedia List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-multimedia@freebsd.org MIME-Version: 1.0 References: <03103736-8052-5901-b5bf-288a313af874@selasky.org> <8ff167fe-51e7-2239-2fa6-69a935a5dc11@selasky.org> <65abdb25-fc5f-e760-7558-8713dbc2ed50@selasky.org> In-Reply-To: <65abdb25-fc5f-e760-7558-8713dbc2ed50@selasky.org> From: J P Date: Sat, 23 Oct 2021 10:57:06 +0200 Message-ID: Subject: Re: tee-like function via virtual_oss To: Hans Petter Selasky Cc: freebsd-multimedia@freebsd.org Content-Type: multipart/alternative; boundary="000000000000a2ef8705cf015050" X-Rspamd-Queue-Id: 4Hbw8N4HZTz3rCd X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=NusLfjaR; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of webplication@gmail.com designates 2607:f8b0:4864:20::12f as permitted sender) smtp.mailfrom=webplication@gmail.com X-Spamd-Result: default: False [-3.99 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-multimedia@freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::12f:from]; NEURAL_HAM_SHORT(-0.99)[-0.991]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] X-ThisMailContainsUnwantedMimeParts: Y --000000000000a2ef8705cf015050 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, so I finally got some time to play with this thing. Virtual_oss does work as you indicate as long as I use sox'splay/rec as in your example. When I use firefox it does play but when I record there is no sound in the recorded file. I have firefox compiled as follows: Options : ALSA : off CANBERRA : off DBUS : on DEBUG : off FFMPEG : on JACK : off LIBPROXY : off LTO : off OPTIMIZED_CFLAGS: on PROFILE : on PULSEAUDIO : on SNDIO : off TEST : off Firefox uses PA, so I can set the playback device to the newly created dsp0.9 (it pops up as a duplicate dps0, I mean, by the same name) but it's there, reproduces audio and I can set the volume: cat /dev/sndstat Installed devices: pcm0: (play) default pcm1: (play) pcm2: (play/rec) pcm3: (play) pcm4: (play/rec) Installed devices from userspace: pcm0: (play/rec) dsp0.9: (play/rec) Note how the "original" device although it's still there, is not functional from firefox (i.e. plays no sound anymore), I do have to switch to the new device for playback. This behavior is not shown by mplayer, for example, that uses whatever the hw.snd_default_unit is, in this case pcm0, and works. Sox's play, needs the env AUDIODEV to be set to the news device to work, otherwise plays no sound either. Nevertheless, the file recorded when firefox reproduces audio, contains only 0s. Can you suggest how to solve? Thank you. BR El mi=C3=A9, 6 oct 2021 a las 10:17, Hans Petter Selasky (= ) escribi=C3=B3: > On 10/6/21 10:12 AM, J P wrote: > > -T /dev/sndstat -C 2 -c 2 -r 48000 -b 24 -s 8.0ms -R /dev/null *-P > > /dev/dsp0 -d dsp0.9* -M x,0,0,0,0,0 -M x,1,1,0,0,0 -t dsp.ctl -i 10 -S > > You've swapped two arguments. Try this: > > -P /dev/dsp0.9 -d dsp0 > > --HPS > --000000000000a2ef8705cf015050--