From nobody Tue May 23 21:53:46 2023 X-Original-To: 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 4QQp3t5F71z4T5KT for ; Tue, 23 May 2023 21:53:46 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QQp3t21hVz432J for ; Tue, 23 May 2023 21:53:46 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1684878826; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZHhAcYQAiRQW1ZjjYUfnkVoBJiAg1qpgud5hy2f0YBA=; b=PoNcJFwwlXMrE3tlupDxPQZEPfRhcUJRGG/5fcZ+gzCAgJ+kt4miMTqmCnKw4k854FlUty enPqHYQ+wD7FO0UHwHL9LmCif1/1GqegfVdIXc+1UFl4UdBg/hlxkvcsoGglJwoYK12e0J Y2BEOPkXikWcxQmIrcMRPz4tMKAQhAxTqwVmBwNK4Nnw3H/vDc/qgKNWybzXRfBATM8ZRX mOovmSmsjVc0Rrxzx1UN0YykjLNnHL6vv1f2oGDbHWhymGxkWFAwJnyg9x5FlglKefusOm UG8/RLRkmu/2+WqzWq7NrDwGq/+2WJ2jtqOVfuCuXRsNkakmLH6iG906B+88kQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1684878826; a=rsa-sha256; cv=none; b=Aj4rwA5QBqXZXdSpBf9EjHknZfHyA92+CDZ0t8wa8SOCmaXwTrgLllEXo/0z+ixasf6dpt VMtnTalTN9jcpO0mNJojdQiUVKQeLv7pfuZOnjWsOhIvxOSQl7oCmE7rnrZpK7cueJyggU 9nLCVb+WSW+ZrNcm2tzOia1sEgOiiw3eIDJ3d6ilTjsOO70h+qacr6US0eWSgwIgLn/66W WiWSWkh2l00iftdnijJAvBae/e4rPlnVvFuF0JMP8+ClYpJsW3AtD9Q+FeZ3NuqBq0aPib i1uqxe3nujuAEg33LuLx/5vq+oxvztMq6wnDNGS4d9nnW7UKa3mst49XZhNUrg== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QQp3t14DPzHDX for ; Tue, 23 May 2023 21:53:46 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 34NLrkvf043255 for ; Tue, 23 May 2023 21:53:46 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 34NLrkM3043254 for multimedia@FreeBSD.org; Tue, 23 May 2023 21:53:46 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: multimedia@FreeBSD.org Subject: [Bug 271559] [sound] [snd_uaudio] Creative Katana V2X garbled audio Date: Tue, 23 May 2023 21:53:46 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 13.2-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: dev@submerge.ch X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: multimedia@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated 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 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D271559 --- Comment #10 from Florian Walpen --- (In reply to Emanuel Haupt from comment #8) Ok, this is what I think is happening. Your device expects 6 (5.1) channels of 24bit samples at 48kHz: > uaudio1: on usbus5 > uaudio1: Play[0]: 48000 Hz, 6 ch, 24-bit S-LE PCM format, 2x8ms buffer. > uaudio1: Record[0]: 48000 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer. The default pcm vchanformat (man sound) is set to 2 channel 16bit at 48kHz: > dev.pcm.8.play.vchanformat: s16le:2.0 > dev.pcm.8.play.vchanrate: 48000 > dev.pcm.8.play.vchanmode: fixed And the default vchan conversion path looks good to me: > {userland} -> feeder_mixer(0x00200010) -> feeder_format(0x00200010 -> 0x0= 0201000) -> feeder_matrix(2.0 -> 5.1) -> feeder_format(0x08601000 -> 0x0861= 0000) -> {hardware} Which means 2 channel 16bit goes into volume mixer, format conversion to 32= bit, matrix expansion from 2 to 5.1 channels, format conversion to 24bit, then to the hardware. The conversion chain for your MP3 playback has a problem: > {userland} -> feeder_root(0x00200010) -> feeder_volume(0x00200010) -> fee= der_rate(0x00200010 q:1 44100 -> 48000) -> {hardware} There's sample rate conversion from 44.1kHz to 48kHz, but no expansion to 5= .1 channels, and no format conversion to 24bit. Things you could try before going the virtual_oss route: * Play something at 48kHz sample rate, like most videos. It may use the default vchan conversion. * Play 32bit samples, it simplifies conversion for matrix expansion. Like = "mpv --audio-format=3Ds32 file.mp3". * Set "sysctl dev.pcm.8.play.vchanformat=3Ds32le:2.0". * Set "sysctl dev.pcm.8.play.vchanformat=3Ds32le:5.1" or even "sysctl dev.pcm.8.play.vchanformat=3Ds24le:5.1". You can check /dev/sndstat again for the conversion chain. Invoking players from CLI usually prints sample rate and format used. I'm not sure how well = they cope with 5.1 channels though. --=20 You are receiving this mail because: You are the assignee for the bug.=