• Play audio CD-ROM on Slack 15?

    From Mike Spencer@mds@bogus.nodomain.nowhere to alt.os.linux.slackware on Sat Aug 2 18:14:36 2025
    From Newsgroup: alt.os.linux.slackware


    I just discovered that I can't play a music cd on my Slackware 15.0
    install.

    Previously I routinely used:

    enoch% cdp play 1

    which prints

    cdp : audio CD player by saby@balu.sch.bme.hu
    Playing tracks 1-10...

    but then exits silently without doing anything else.

    enoch% mplayer -cdrom-device /dev/cdrom cdda://1

    plays but stops evey ca. 15 seconds to say

    [AO_ALSA] Write error: Broken pipe
    [AO_ALSA] Trying to reset soundcard.

    "Apropos audio" gives me a vast array of programs to manipulate audio
    files and streams, change codecs, modify effects etc. etc. none of
    which I want to do.

    All I want to do is play the music CD. How do I do that now?
    --
    Mike Spencer Nova Scotia, Canada
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Ben Collver@bencollver@tilde.pink to alt.os.linux.slackware on Sun Aug 3 13:52:19 2025
    From Newsgroup: alt.os.linux.slackware

    On 2025-08-02, Mike Spencer <mds@bogus.nodomain.nowhere> wrote:

    I just discovered that I can't play a music cd on my Slackware 15.0
    install.

    enoch% mplayer -cdrom-device /dev/cdrom cdda://1

    plays but stops evey ca. 15 seconds to say

    [AO_ALSA] Write error: Broken pipe
    [AO_ALSA] Trying to reset soundcard.

    Your mplayer example works for me on Slackware64 15.0.

    Does the output of `groups` include audio and cdrom? If not, you
    might want to add your username to them in /etc/group, log out,
    log back in again, and try again.

    Otherwise, i'd probably resort to `strace`

    Best regards,
    -Ben
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From jayjwa@jayjwa@atr2.ath.cx.invalid to alt.os.linux.slackware on Sun Aug 3 13:55:29 2025
    From Newsgroup: alt.os.linux.slackware

    Mike Spencer <mds@bogus.nodomain.nowhere> writes:

    I just discovered that I can't play a music cd on my Slackware 15.0
    install.

    enoch% mplayer -cdrom-device /dev/cdrom cdda://1

    plays but stops evey ca. 15 seconds to say

    [AO_ALSA] Write error: Broken pipe
    [AO_ALSA] Trying to reset soundcard.

    Something's up. It happens here too on Current.

    mplayer cdda:////dev/sr0
    MPlayer 20250330-14.2.0 (C) 2000-2025 MPlayer Team

    Playing cdda:////dev/sr0.
    Found audio CD with 30 tracks.
    rawaudio file format detected.

    Track 1 ========================================================================== Opening audio decoder: [pcm] Uncompressed PCM audio decoder
    AUDIO: 44100 Hz, 2 ch, s16le, 1411.2 kbit/100.00% (ratio: 176400->176400) Selected audio codec: [pcm] afm: pcm (Uncompressed PCM) ==========================================================================
    AO: [alsa] 44100Hz 2ch s16le (2 bytes per sample)
    Video: no video
    Starting playback...
    A: 15.5 (15.4) of 4360.8 ( 1:12:40.7) 0.0%
    [AO_ALSA] Write error: Broken pipe
    [AO_ALSA] Trying to reset soundcard.
    A: 31.5 (31.4) of 4360.8 ( 1:12:40.7) 10.2%
    [AO_ALSA] Write error: Broken pipe
    [AO_ALSA] Trying to reset soundcard.
    A: 33.3 (33.3) of 4360.8 ( 1:12:40.7) 19.2%

    Using VLC (Media -> Open Disc, CD) I don't get that message but it seems
    to stutter now and then. I can't tell if it's the system or the
    recording (it's The Germs - the recording is choppy and rough as-is). I
    don't have any other physical CDs left at this time.

    OP couldn't hear the music at all if he was not in the correct group to
    access the CD device file so that's not it.

    It might be a good idea to take this to LQ (if you have an account) so
    the rest of the Slackware crew can look at it.
    --
    PGP Key ID: 781C A3E2 C6ED 70A6 B356 7AF5 B510 542E D460 5CAE
    "The Internet should always be the Wild West!"
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Mike Spencer@mds@bogus.nodomain.nowhere to alt.os.linux.slackware on Mon Aug 4 03:54:01 2025
    From Newsgroup: alt.os.linux.slackware


    Ben Collver <bencollver@tilde.pink> writes:

    On 2025-08-02, Mike Spencer <mds@bogus.nodomain.nowhere> wrote:

    I just discovered that I can't play a music cd on my Slackware 15.0
    install.

    enoch% mplayer -cdrom-device /dev/cdrom cdda://1

    plays but stops evey ca. 15 seconds to say

    [AO_ALSA] Write error: Broken pipe
    [AO_ALSA] Trying to reset soundcard.

    Your mplayer example works for me on Slackware64 15.0.

    I did a complete (except KDE) vanilla install. Audio worked w/ DVDs,
    music files so I never looked at any audio stuff until now.

    Does the output of `groups` include audio and cdrom?

    Yeah. Single user system. I'm in

    users lp floppy audio video cdrom slocate input plugdev power netdev scanner

    Otherwise, i'd probably resort to `strace`

    At about the point of failure, strace says:


    munmap(0xae24a000, 2826240) = 0
    mmap2(NULL, 2826240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xae24a000
    ioctl(3, CDROM_SEND_PACKET, 0xbfb67244) = 0

    [repeated 47 times]

    write(2, "\n", 1) = 1
    write(2, "[AO_ALSA] Write error: Broken pi"..., 35[AO_ALSA] Write error: Broken pipe) = 35
    write(1, "[AO_ALSA] Trying to reset soundc"..., 37[AO_ALSA] Trying to reset soundcard.
    ) = 37

    so I'm no further ahead 'cause that was reported on the invoking
    console.

    MPlayer would be fine if it worked. What I really want is a very
    simple command line tool to just start a cd playing. I've had
    something called cdp for many years that did that. Not on Slack 15,
    It runs, prints

    cdp : audio CD player by saby@balu.sch.bme.hu
    Playing tracks 1-10...

    (so it's read from the CD) but does nothing else.

    write(1, "cdp : audio CD player by saby@ba"..., 46cdp : audio CD player by saby@balu.sch.bme.hu
    ) = 46
    openat(AT_FDCWD, "/dev/cdrom", O_RDONLY) = 3
    ioctl(3, CDROMREADTOCHDR, 0x8049d2c) = 0
    write(1, "Playing tracks 1-10...\n", 23Playing tracks 1-10...
    ) = 23
    ioctl(3, CDROMPLAYTRKIND, 0x8049d3c) = 0
    close(3) = 0
    exit_group(0) = ?
    +++ exited with 0 +++

    Does that tell you anything?

    I found https://hinterhof.net/cdtool/ on line that sound like just
    what I want but it hasn't been maintained/updated for 19 years and has
    compile errors due, aparently, to changes in stdio.h. My very amateur
    attempts to hack around the error produced error-free compile and
    runable program but with further difficulties too tedious to list here
    unless you ask.

    It's getting late. I'll come back to this Tomorrow.



    Best regards,
    -Ben
    --
    Mike Spencer Nova Scotia, Canada
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Ben Collver@bencollver@tilde.pink to alt.os.linux.slackware on Mon Aug 4 14:34:25 2025
    From Newsgroup: alt.os.linux.slackware

    On 2025-08-04, Mike Spencer <mds@bogus.nodomain.nowhere> wrote:
    At about the point of failure, strace says:

    munmap(0xae24a000, 2826240) = 0
    mmap2(NULL, 2826240, PROT_READ|PROT_WRITE,
    MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xae24a000
    ioctl(3, CDROM_SEND_PACKET, 0xbfb67244) = 0

    [repeated 47 times]

    write(2, "\n", 1) = 1
    write(2, "[AO_ALSA] Write error: Broken pi"..., 35[AO_ALSA] Write
    error: Broken pipe) = 35
    write(1, "[AO_ALSA] Trying to reset soundc"..., 37[AO_ALSA] Trying
    to reset soundcard.
    ) = 37

    so I'm no further ahead 'cause that was reported on the invoking
    console.

    I have nothing for this. I am guessing that mplayer reads audio data
    from CDROM and writes it to ALSA.

    It runs, prints

    cdp : audio CD player by saby@balu.sch.bme.hu
    Playing tracks 1-10...

    (so it's read from the CD) but does nothing else.

    write(1, "cdp : audio CD player by saby@ba"..., 46cdp : audio CD
    player by saby@balu.sch.bme.hu
    ) = 46
    openat(AT_FDCWD, "/dev/cdrom", O_RDONLY) = 3
    ioctl(3, CDROMREADTOCHDR, 0x8049d2c) = 0
    write(1, "Playing tracks 1-10...\n", 23Playing tracks 1-10...
    ) = 23
    ioctl(3, CDROMPLAYTRKIND, 0x8049d3c) = 0
    close(3) = 0
    exit_group(0) = ?
    +++ exited with 0 +++

    Does that tell you anything?

    It tells me cdp is not using ALSA. It's telling the CDROM to play a
    track on its line out. I'd double-check the mixer to make sure
    nothing is muted. I'd also want to verify that the line out is
    actually connected to the audio hardware. It brings to mind a
    standard tech support question: When was the last time this worked
    on this hardware? Which version of Slackware was it then?

    Best regards,
    -Ben
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Mike Spencer@mds@bogus.nodomain.nowhere to alt.os.linux.slackware on Wed Aug 6 02:03:29 2025
    From Newsgroup: alt.os.linux.slackware


    jayjwa <jayjwa@atr2.ath.cx.invalid> writes:

    Mike Spencer <mds@bogus.nodomain.nowhere> writes:

    I just discovered that I can't play a music cd on my Slackware 15.0
    install.

    enoch% mplayer -cdrom-device /dev/cdrom cdda://1

    plays but stops evey ca. 15 seconds to say

    [AO_ALSA] Write error: Broken pipe
    [AO_ALSA] Trying to reset soundcard.

    Something's up. It happens here too on Current.

    mplayer cdda:////dev/sr0
    MPlayer 20250330-14.2.0 (C) 2000-2025 MPlayer Team

    Playing cdda:////dev/sr0.
    Found audio CD with 30 tracks.
    rawaudio file format detected.

    Track 1 ========================================================================== Opening audio decoder: [pcm] Uncompressed PCM audio decoder
    AUDIO: 44100 Hz, 2 ch, s16le, 1411.2 kbit/100.00% (ratio: 176400->176400) Selected audio codec: [pcm] afm: pcm (Uncompressed PCM) ========================================================================== AO: [alsa] 44100Hz 2ch s16le (2 bytes per sample)
    Video: no video
    Starting playback...
    A: 15.5 (15.4) of 4360.8 ( 1:12:40.7) 0.0%
    [AO_ALSA] Write error: Broken pipe
    [AO_ALSA] Trying to reset soundcard.
    A: 31.5 (31.4) of 4360.8 ( 1:12:40.7) 10.2%
    [AO_ALSA] Write error: Broken pipe
    [AO_ALSA] Trying to reset soundcard.
    A: 33.3 (33.3) of 4360.8 ( 1:12:40.7) 19.2%

    Okay, so I'm not entirely alone. Make, model and age of CD/DVD drive
    may make a difference.

    I've found a work-around. Use

    mplayer -cache 1024 cdda:////dev/sr0

    Thanks to https://blog.8-p.info/en/2020/08/05/raspi-cd-player/
    for the tip.

    There's a lag as the cache fills. The console output looks like

    A: 251.3 (04:11.2) of 4100.2 ( 1:08:20.1) 0.1% 48%

    where that last number appears to be % of cache fill. It sometimes
    drops to 0 but reverts to a higher number (e.g. 48%) immediately
    without interrupting music.

    Playing a specific track such as

    mplayer -cache 1024 cdda://3 /dev/sr0

    evokes a complaint at start of

    Cache empty, consider increasing -cache and/or -cache-min.

    but then playing proceeds with no further error or interruption.

    It may not be bulletproof. But I've played 2 CDs through without any
    audible flaw or error report on the console.


    I don't understand the sound setup on Slack 15.

    rc.alsa and rc.pulseaudio in /etc/rc.d are both 644. rc.pulseaudio
    says

    # Start/stop/restart PulseAudio in system mode.
    # In this mode, a single system instance of PulseAudio will be shared by
    # multiple local users.
    #
    # Please note: this is not generally the best way to use PulseAudio!
    # Normally pulseaudio will start automatically as-needed with an instance
    # per audio user.

    How does that work? pgrep shows a pulseaudio process running even
    when mplayer isn't playing. Where is the running process started?

    top(1) shows heavy CPU use by pulseaudio when mplayer is playing a
    CD. At the same time, mplayer's console output refers to

    AO: [alsa] 44100Hz 2ch s16le (2 bytes per sample)

    when playing a CD.

    Is there somewhere I can find a an overview of the variously
    alternative, conflicting, superimposed, interacting or $whatever
    components of current Linux audio? The manpages don't provide that.

    Using VLC (Media -> Open Disc, CD) I don't get that message but it seems
    to stutter now and then. I can't tell if it's the system or the
    recording (it's The Germs - the recording is choppy and rough as-is). I
    don't have any other physical CDs left at this time.

    Possibly the same problem? CD read is slow enough that the/a cache is
    running dry and some quirk -- hardware, SCSI, ?? -- briefly stalls
    refilling?

    It might be a good idea to take this to LQ (if you have an account) so
    the rest of the Slackware crew can look at it.

    I'm happy with what I have now. Who knows what gotchas may emerge
    later.

    Many years ago I asked for help playing CDs, was directed to ensure
    the analog cable from drive to sound card was in place. Aound &
    installed a cable. All good, TYVM.

    Shortly thereafter, I bought a new internal drive, dutifully located
    the right analog cable in my junk heap, installed it and had no sound.
    Asked for help again and was reproved for having failed to pay
    attention the first time. A day later I located the wiring diagram
    for the drive on line. It clearly showed and said that the plug for
    the analog cable was present but wasn't connected to anything inside.

    Now that just wasn't fair! :-)

    Thanks all for your attention. Happily listening to Mussorgsky piano
    reverie.
    --
    Mike Spencer Nova Scotia, Canada
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Alexander Grotewohl@alexm0n@gmail.com to alt.os.linux.slackware on Wed Aug 6 05:46:11 2025
    From Newsgroup: alt.os.linux.slackware

    On 06 Aug 2025 02:03:29 -0300, Mike Spencer wrote:
    I don't understand the sound setup on Slack 15.

    rc.alsa and rc.pulseaudio in /etc/rc.d are both 644. rc.pulseaudio says

    # Start/stop/restart PulseAudio in system mode.
    # In this mode, a single system instance of PulseAudio will be
    shared by # multiple local users.
    #
    # Please note: this is not generally the best way to use
    PulseAudio!
    # Normally pulseaudio will start automatically as-needed with an
    instance # per audio user.

    How does that work? pgrep shows a pulseaudio process running even when mplayer isn't playing. Where is the running process started?

    pulseaudio is spawned by the first program that tries to use it (actually probably by libpulse not the program's code). it just stays running after
    that first audio program is gone. if you choose the right program (single thread, like running 'pactl info' or the 'playsound' command) the spawnee pulseaudio process id will be exactly one above the spawner process id.
    --- Synchronet 3.21a-Linux NewsLink 1.2