From nobody Sat Aug 24 07:24:36 2024 X-Original-To: bugs@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 4WrT3865rdz5VKxS for ; Sat, 24 Aug 2024 07:24:36 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WrT382qM8z4ZQ2 for ; Sat, 24 Aug 2024 07:24:36 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1724484276; a=rsa-sha256; cv=none; b=NOefoa5U7LQrDE+5Zd4/r7Wg14gljDMHCkShQGVAkLK4dYBN+UyOS7ZALA2cF6Yt7tG0C8 nATDQzV9kVuZ6RA0hjfs4oos5smXRq0/Cz06swEbohauimL7temKSaQXsJbUfmzFFIGpb1 07Dkhg8oYWe1xPvNmZY4hS+MXNN7R5r6HOvpe7J3eU67voym6mjbumFrfs4Wrw/HFlMz40 RNfiaMTotGKGlHLRF/QGzoIQiWeKifIrRoMyn30G4u9N79JOPTTr9Z684kFYOeErvtZ9Iv 4mOiNf9Z0a3yvXFopE7Na85ZEvtBVyzMD3uAjPkpD23/wxV+Efdv1qTc/QWviA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1724484276; 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=zAwVfZHu9vZDZPRHm/1RugUtR87gDgWzUUBWj1cYWt0=; b=Llvpy6L+FSmw10VkyzTU/lD0ZttqZ9oj4ZD96fCNn1xBi25btDoqQqvnOlr/6/M8Y8uCS8 GmpDElN5d10VK3Hb+oTVKB3Jl4dH7wfgeXG8fls8R6w8VZIUd72Z6C8l3RHdzWT3UYdk7v n4IimGx8sxT9UrMvjgJWT9+cU56Gt3dp4ZsuZMTFsEiFQOxvWcGOC/bfccxCZb09mb3noq vt/rEn/4KSWhm70tH/rF3YMdn5iS/IsAxShrAzfxX9n+qNZQYUjdDyuC6vGl+ZShpqACs9 NPtWjVsiDLTHxv8AObhqpqt42V76kXC1UjVvmLAoNITf951cHdfsIFqYftWRMA== 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 4WrT382PkKzmD1 for ; Sat, 24 Aug 2024 07:24:36 +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 47O7OaCA019427 for ; Sat, 24 Aug 2024 07:24:36 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 47O7OaSE019426 for bugs@FreeBSD.org; Sat, 24 Aug 2024 07:24:36 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: bugs@FreeBSD.org Subject: [Bug 281020] Cannot play sound tracks on mixed-mode CDs (read() fails with EINVAL) Date: Sat, 24 Aug 2024 07:24:36 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 14.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: damjan.jov@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@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: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D281020 Bug ID: 281020 Summary: Cannot play sound tracks on mixed-mode CDs (read() fails with EINVAL) Product: Base System Version: 14.1-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: damjan.jov@gmail.com On a mixed-mode CD (a CD with both data and sound tracks), it is not possib= le to play the sound tracks. The way that eg. multimedia/vlc reads sound from a CD involves: int fd =3D open("/dev/cd0", ...) int block_size =3D 2352; ioctl(fd, CDRIOCSETBLOCKSIZE, &block_size); lseek(fd, some multiple of 2352, SEEK_SET); read(fd, buffer, some multiple of 2352); and on a pure sound CD, this works perfectly, both in VLC and a test application I made. However when using that code on a mixed-mode CD (with both data and sound tracks), read() always fails with EINVAL, whether the offset is within a da= ta track or a sound track. The only way to make read() succeed on such CDs, is= to use a block size of 2048, and an offset that places the read within a data track. Attempting to read music tracks always fails with EINVAL, regardless= of the block size. It will take me some time to confirm, but this may be a regression from com= mit dd78f43259efd551f76a6cb7744bce49c215863e, which was meant to "make the media check asynchronous", but also made many other changes, including setting a block size of 2352 for pure sound CDs (which could be why they still work, = but mixed-mode CDs don't). --=20 You are receiving this mail because: You are the assignee for the bug.=