From nobody Sat Dec 3 14:09:08 2022 X-Original-To: usb@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 4NPWrj1QNqz4jV3X for ; Sat, 3 Dec 2022 14:09:09 +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 4NPWrh6SVZz3Qjr for ; Sat, 3 Dec 2022 14:09:08 +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=1670076548; 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; bh=6DHxOMJ2S6GMPM14EyaZKBNWAwwrHMX0TjVcYuTN5aw=; b=YKSomBDMWJqlUrzGueXtxP217t4gOzRtIv6VIWAprVtu40Bz9BFzwX8MJ/8OJYdpluk4hl pBUPi9KsFI0HBflGdZGP0QHDWSL4TkfFqwdioHjXByG5yRIHYDrkNtKc/ZT9uYcK5nrWwm MOurOj/9I7584npY9vtQm+Y3wUOYvjEmyIQs57NfrmOcWkq8Bb1Q4ynrhQaezQL6JPphE9 eLir+BVp1EfASIgiXb0qpclSuaKp9uqUBjBHS3YGcWAWIxAPQSxZBqQhSV00bHi1Bnmk/v V+8d+M54SwRtbFjqka43H+JAJfH3q8PgU3u21EWHCTluEaaUxP8gLhRcNjFNYw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1670076548; a=rsa-sha256; cv=none; b=IqgbPcxeK+ac763zlSRaSydIccdICrKo4qjfxn0eRS/3/4TKpRQByD91kCvR4JolEWK7nO AaQ+ivu1E8j0NPsMjVXTSg2WIFGniPdCXMgY7brn3p47WHg36sqaa5M5J0LiWyAOwZyhov DpCnrtJ7uDzQ8LfH+MSpkSF3k/wugGcfPN8SaEBOX1LJAmuGVOLW2W2xzdSi0KhDS7yonz O+GV3KbCpTFzMFSHVW2VMW2T6En0PsNgFii/PIXaJ6sTrUrLqqU+1q2fVP5SujPZ/i5ELU GSbiuAs9meJq9bTs1Bjs4wtGE5nfdEpdNW3VnoI5GNSw4v+oqUgTgwjSrgAgQg== 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 4NPWrh5Vs1zxYw for ; Sat, 3 Dec 2022 14:09:08 +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 2B3E98i5077712 for ; Sat, 3 Dec 2022 14:09:08 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 2B3E98t7077711 for usb@FreeBSD.org; Sat, 3 Dec 2022 14:09:08 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: usb@FreeBSD.org Subject: [Bug 268136] [snd_uaudio] Distorted audio from MOTU M4 USB interface Date: Sat, 03 Dec 2022 14:09:08 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: usb X-Bugzilla-Version: 13.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: markus.buretorp@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: usb@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: 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: FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-usb List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D268136 Bug ID: 268136 Summary: [snd_uaudio] Distorted audio from MOTU M4 USB interface Product: Base System Version: 13.1-RELEASE Hardware: amd64 OS: Any Status: New Severity: Affects Only Me Priority: --- Component: usb Assignee: usb@FreeBSD.org Reporter: markus.buretorp@gmail.com All audio coming from the MOTU M4 audio interface is distorted. There is a = high frequency buzz on top of all sounds, both sounds generated by FreeBSD over = USB and external analog inputs. I've tried all a lot of sysctl combinations but= no difference at all. As I said this affects all analog inputs with direct monitoring. For example with the computer OFF I can connect an external signal generator to one ana= log input and hear it. Once I boot FreeBSD and do something audio related like opening a YouTube tab it starts distorting the external signal as well as YouTube. Now if I close the YouTube tab the external signal is clean again = and the distortion is gone. My guess is that something with the uaudio initialization messes up the aud= io interface internals. POTENTIAL FIX: This has nothing to do with PulseAudio as it happens on a base installation with no pkgs. BUT the only fix I've found is to either start or kill the PulseAudio daemon with 'pulseaudio -D' or 'pulseaudio -k'. So something in = the PulseAudio init/shutdown code is pokes something which fixes the audio. Note that this has to be repeated every time audio is reinitialized, so if you c= lose YouTube and later open it again you would have to do the PulseAudio trick again. Maybe stepping through the PA init code to find what function call fixes it would help. INFO: root@marcus:~ # freebsd-version 13.1-RELEASE-p5 root@marcus:~ # dmesg | grep -i audio hdaa0: at nid 1 on hdacc0 uaudio0 on uhub1 uaudio0: on usbus3 uaudio0: Play[0]: 192000 Hz, 4 ch, 32-bit S-LE PCM format, 2x8ms buffer. uaudio0: Play[0]: 176400 Hz, 4 ch, 32-bit S-LE PCM format, 2x8ms buffer. uaudio0: Play[0]: 96000 Hz, 4 ch, 32-bit S-LE PCM format, 2x8ms buffer. uaudio0: Play[0]: 88200 Hz, 4 ch, 32-bit S-LE PCM format, 2x8ms buffer. uaudio0: Play[0]: 48000 Hz, 4 ch, 32-bit S-LE PCM format, 2x8ms buffer. uaudio0: Play[0]: 44100 Hz, 4 ch, 32-bit S-LE PCM format, 2x8ms buffer. uaudio0: Record[0]: 192000 Hz, 4 ch, 32-bit S-LE PCM format, 2x8ms buffer. uaudio0: Record[0]: 176400 Hz, 4 ch, 32-bit S-LE PCM format, 2x8ms buffer. uaudio0: Record[0]: 96000 Hz, 4 ch, 32-bit S-LE PCM format, 2x8ms buffer. uaudio0: Record[0]: 88200 Hz, 4 ch, 32-bit S-LE PCM format, 2x8ms buffer. uaudio0: Record[0]: 48000 Hz, 4 ch, 32-bit S-LE PCM format, 2x8ms buffer. uaudio0: Record[0]: 44100 Hz, 4 ch, 32-bit S-LE PCM format, 2x8ms buffer. uaudio0: MIDI sequencer. pcm4: on uaudio0 uaudio0: No HID volume keys found. root@marcus:~ # sysctl hw.snd hw.snd.maxautovchans: 16 hw.snd.default_unit: 4 hw.snd.version: 2009061500/amd64 hw.snd.default_auto: 1 hw.snd.verbose: 0 hw.snd.vpc_mixer_bypass: 1 hw.snd.feeder_rate_quality: 1 hw.snd.feeder_rate_round: 25 hw.snd.feeder_rate_max: 2016000 hw.snd.feeder_rate_min: 1 hw.snd.feeder_rate_polyphase_max: 183040 hw.snd.feeder_rate_presets: 100:8:0.85 100:36:0.92 100:164:0.97 hw.snd.feeder_eq_exact_rate: 0 hw.snd.feeder_eq_presets: PEQ:16000,0.2500,62,0.2500:-9,9,1.0:44100,48000,88200,96000,176400,192000 hw.snd.basename_clone: 1 hw.snd.compat_linux_mmap: 0 hw.snd.syncdelay: -1 hw.snd.usefrags: 0 hw.snd.vpc_reset: 0 hw.snd.vpc_0db: 45 hw.snd.vpc_autoreset: 1 hw.snd.timeout: 5 hw.snd.latency_profile: 1 hw.snd.latency: 2 hw.snd.report_soft_matrix: 1 hw.snd.report_soft_formats: 1 root@marcus:~ # sysctl hw.usb.uaudio hw.usb.uaudio.debug: 0 hw.usb.uaudio.buffer_ms: 8 hw.usb.uaudio.default_channels: 0 hw.usb.uaudio.default_bits: 32 hw.usb.uaudio.default_rate: 0 hw.usb.uaudio.handle_hid: 1 --=20 You are receiving this mail because: You are the assignee for the bug.=