Take a look at our
ThinkPads.com HOME PAGE
For those who might want to contribute to the blog, start here: Editors Alley Topic
Then contact Bill with a Private Message

ThinkPad 380Z PCM sound issues

Older ThinkPads from the 300, 500, 600, 700 Series, iSeries, Transnote etc.
Post Reply
Message
Author
thecobra
Posts: 30
Joined: Sat Dec 24, 2022 12:44 pm
Location: New York, New York

ThinkPad 380Z PCM sound issues

#1 Post by thecobra » Tue Jun 04, 2024 1:28 am

So, long story short: I recently installed antiX Linux on my 380Z, and I'm trying to get audio working. The sound card in it is a CS4237 (according to ThinkWiki and my own observations). At first my sound card wasn't registered by the kernel so i debugged that and now I have a very odd issue, where the audio is extremely distorted, but only when playing through the "PCM" input in ALSA. I know the speakers aren't the problem because if I enable "Line" and plug in another computer's headphone jack to the 380Z's mic in, the audio plays perfectly fine with no issues (admittedly this took a few minutes in alsamixer to figure out the right settings for, but regardless it works). This page on alsa.opensrc.org helped a great deal with narrowing down the issue, describing that "PCM" means audio that's inputted over the ISA bus, like through an application, but I don't know what that means exactly, or if it even helps here. I tried simply installing PulseAudio, but after configuring it to not exit and testing it with `-vv', the daemon just crashes with "Illegal instruction" when using `paplay'. So i uninstall PulseAudio and try again with ALSA alone, but this time it's different, and the audio seems to actually play, but very distorted, as opposed to whatever ALSA was doing before (see links below). Using alsactl to store the state and restore after rebooting didn't seem to make the PulseAudio effect happen, so I don't know what PulseAudio is doing for it to semi-work.


Running `aplay -vv /usr/share/sounds/alsa/Front_Center.wav'

What it should play:
http://0x0.st/XqLK.wav

What it sounds like before PulseAudio:
http://0x0.st/XqLb.wav (it goes on like this seemingly forever until i ^C it)

What it sounds like after install and uninstalling PulseAudio:
http://0x0.st/XqL8.wav


I'll be happy to provide more details upon request.
(Un)professional laptop breaker, semi-professional sysadmin at ~vern

380Z, A31 (w/ A31p lid assembly)
R400, R500
T60, T400, T400s, T500, W500
X30 2672-4B7, X60, X200s, X200 Tablet
Z61m
s30
G50

Enig
Freshman Member
Posts: 83
Joined: Thu May 20, 2021 10:53 am
Location: Copenhagen, Denmark

Re: ThinkPad 380Z PCM sound issues

#2 Post by Enig » Thu Jun 06, 2024 4:24 am

Hey thecobra,

Not a Linux expert by any stretch of the imagination, but have you done the BIOS setting mentioned here?
https://www.thinkwiki.org/wiki/CS4237
..especially the part about disabling "Simple Boot"

Also here from ALSA regarding the 600 (uses the same CS4237B, so it's likely similar):
https://alsa.opensrc.org/ThinkPad600
Thinkpads: Too many. Currently playing with an IBM 535

thecobra
Posts: 30
Joined: Sat Dec 24, 2022 12:44 pm
Location: New York, New York

Re: ThinkPad 380Z PCM sound issues

#3 Post by thecobra » Thu Jun 06, 2024 5:44 am

Yeah I have Quick Boot disabled, it was the only way for the kernel module to even load. I'll look into the recommendations listed on that page.
(Un)professional laptop breaker, semi-professional sysadmin at ~vern

380Z, A31 (w/ A31p lid assembly)
R400, R500
T60, T400, T400s, T500, W500
X30 2672-4B7, X60, X200s, X200 Tablet
Z61m
s30
G50

thecobra
Posts: 30
Joined: Sat Dec 24, 2022 12:44 pm
Location: New York, New York

Re: ThinkPad 380Z PCM sound issues

#4 Post by thecobra » Thu Jun 06, 2024 7:13 am

These seem to be mostly about getting the hardware recognized by the kernel, and it doesn't say much about any PCM issue, or distortion at all.
(Un)professional laptop breaker, semi-professional sysadmin at ~vern

380Z, A31 (w/ A31p lid assembly)
R400, R500
T60, T400, T400s, T500, W500
X30 2672-4B7, X60, X200s, X200 Tablet
Z61m
s30
G50

thecobra
Posts: 30
Joined: Sat Dec 24, 2022 12:44 pm
Location: New York, New York

Re: ThinkPad 380Z PCM sound issues

#5 Post by thecobra » Fri Jun 07, 2024 1:03 am

The distortion might be a result of the fact that it's slow? doing `time aplay -vvv /usr/share/sounds/alsa/Front_Center.wav` shows ~10s on the 380Z, but just ~1.5s on a different computer (with working intel hda). With -vvv, it also displays the "Max peak (1024 samples)". These are outputted every 1024 samples and it seems that the 380Z outputs them much more slowly than the other machine.
`aplay -vvv` output for the 380Z is here : http://0x0.st/Xbcd.txt
`aplay -vvv` output for the other machine is here: http://0x0.st/Xbch.txt

Diffing the two, something that stands out to me are the slightly off values for the 380Z. For example, the buffer_size is 16393 as opposed to 16384, same with the start_ and stop_threshold. This could just be how it is and not a problem but idk. No idea what could be causing the 380Z to sample really slowly, but thats probably the issue.
(Un)professional laptop breaker, semi-professional sysadmin at ~vern

380Z, A31 (w/ A31p lid assembly)
R400, R500
T60, T400, T400s, T500, W500
X30 2672-4B7, X60, X200s, X200 Tablet
Z61m
s30
G50

thecobra
Posts: 30
Joined: Sat Dec 24, 2022 12:44 pm
Location: New York, New York

Re: ThinkPad 380Z PCM sound issues

#6 Post by thecobra » Fri Jun 07, 2024 10:37 pm

When running dosbox, i noticed that the actual program was running much slower than the recordings it takes. I wonder if this relates to the sound issue? Maybe the CPU is the problem?
(Un)professional laptop breaker, semi-professional sysadmin at ~vern

380Z, A31 (w/ A31p lid assembly)
R400, R500
T60, T400, T400s, T500, W500
X30 2672-4B7, X60, X200s, X200 Tablet
Z61m
s30
G50

Post Reply
  • Similar Topics
    Replies
    Views
    Last post

Return to “ThinkPad Legacy Hardware”

Who is online

Users browsing this forum: No registered users and 19 guests