LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices


Reply
  Search this Thread
Old 02-23-2024, 08:10 AM   #1
slackmensch
Member
 
Registered: Apr 2021
Location: hickville
Distribution: Arch, Normal, Poisson, Slackware, Manjaro
Posts: 50
Blog Entries: 7

Rep: Reputation: Disabled
Do soundcards in laptops/AIO PCs lie about supporting rates higher than 48KHz?


I have Manjaro Linux installed on a 27" iMac and pipewire came preinstalled. In /proc/asound/card0/codec#0 it says pretty much all commonly used sampling rates and depths are supported:

Code:
codec: Cirrus Logic CS4206
Address: 0
AFG Function Id: 0x1 (unsol 0)
Vendor Id: 0x10134206
Subsystem Id: 0x106b2000
Revision Id: 0x100302
No Modem Function Group found
Default PCM:
    rates [0x7f0]: 32000 44100 48000 88200 96000 176400 192000
    bits [0x1e]: 16 20 24 32
    formats [0x3]: PCM FLOAT
.
.
.

However, when I play any "HD" audio files obtained from eclassical.com and nativedsd.com (96KHz/24bit, 192KHz/24bit) they're resampled to 48KHz. This is with nothing in ~/.config/pipewire/pipewire.conf.d and I checked that there was nothing in /etc/pipwire/pipewire.conf.d either.

I am determining the sampling rate during playback from looking at /proc/asound/card0/pcmp0/sub0/hw_params while sound is playing: it always says 48KHz.

If I make a file ~/.config/pipewire/pipewire.conf.d/10-rates.conf per the pipewire documentation:
Code:
# Adds more common rates
context.properties = {
    default.clock.allowed-rates = [ 44100 48000 88200 96000 192000 ]
}
and restart the pipewire service, sound players seem to work without error but there is no sound at all for files 48KHz and above. CD rips (44100/16bit) play fine and are not resampled to 48KHz. /proc/asound/card0/pcmp0/sub0/hw_params says the correct rate for 96 and 192kHz files but there is no sound while the player thinks its playing. I tried VLC, mpv, and pw-play players and all behave the same way.

I have also examined the FLAC files using spek (it's in AUR, but really ought to be included in the distro) to make sure they are really 96KHz/24bit and 192KHz/24bit.

I'm beginning to suspect CS4206 does not really support rates higher than 48KHz, pipewire has a bug, or there is a problem with the kernel sound drivers. I mean, almost no one likes classical music or jazz--what is typically recorded at these higher rates--so maybe no one bothered to check whether these rates actually work?

Last edited by slackmensch; 02-23-2024 at 08:12 AM.
 
Old 02-23-2024, 11:37 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,306

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
To me, there'd be a question of software, and hardware. You need to know that the original ISA bus ran at 7.86(?)MHz and through some labyrinthine and convoluted reasoning involving sample rates 44100khz was chosen as the max sample rate.

A lot of stuff got set up around that, and it kept downloads small. I would chase data on the chip, that "Cirrus Logic CS4206." What sampling rates does that handle?

IME, most internal devices in PCs have 44 or 48 khz sample rates, although usb sound cards go much higher (192khz). I can't talk definitely about Macs. It could be that the software will do 192khz, but the hardware won't.
 
Old 02-24-2024, 07:40 AM   #3
slackmensch
Member
 
Registered: Apr 2021
Location: hickville
Distribution: Arch, Normal, Poisson, Slackware, Manjaro
Posts: 50

Original Poster
Blog Entries: 7

Rep: Reputation: Disabled
Well, it appears Cirrus Logic doesn't really make a 4206?! The closest match is 4207 and the rumormill says 4206 is 4207 but somehow customized for Apple. I give up. Plugging in my USB DAC....
 
Old 02-24-2024, 11:30 AM   #4
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,306

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
What's the sampling rate on the CS4207?

BTW, a lower number strongly implies lesser features, not more. So a CS4207 modified for Apple might be CS4207<letters>. Is there a CS4205? It's most likely to be a testing thing if the rumour mill is right. E.g. lower sampling rate.

You see this most often with CPUs. I have a Ryzen 5 5600. There is a Ryzen 5 5600X with 100MHz extra frequency and 300MHz extra on turbo, which sells for €100 extra. But many parts that fail the 5600X spec actually pass the 5600 spec. So they are sold as 5600s.
 
Old 02-28-2024, 08:00 AM   #5
slackmensch
Member
 
Registered: Apr 2021
Location: hickville
Distribution: Arch, Normal, Poisson, Slackware, Manjaro
Posts: 50

Original Poster
Blog Entries: 7

Rep: Reputation: Disabled
Quote:
Originally Posted by business_kid View Post
What's the sampling rate on the CS4207?
You can read the specs (pronounced "marketing info") at Cirrus Logic; it appears to support 44.1 to 192kHz with depths 16,32 bits.

I'm thinking maybe 4206 in iMac is just 48kHz. Or that's all the generic kernel sound drivers support? Anyway, I really have given up on this: the reward is too little for way too much wading into the ever-shifting sands of ~/.config.

It's curious that pipewire has so many debugging tools: pw-cat, pw-cli, pw-top, pw-dump etc.... Bet it "just working" properly is a rare thing.

In a fit of disgust with the ongoing Linux Sound Server mess, I decided to try FreeBSD on this system. (FreeBSD still uses ye olde OSS.) Unfortunately, it works, but the sound quality is horrible and no one knows why. iMac 2011 with CS4206 has been discussed on several BSD forums (not just by me begging for help) with no conclusion reached. Maybe Apple broke 4207 in some secret way so it only works 100 percent properly with Mac OS. No, I'm not installing whatever last bloaty, horrible old version OS X worked on iMac 2011 just to test, LOL.
 
Old 02-28-2024, 10:58 AM   #6
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,306

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
Apple have a policy of not being give-ish about hardware details or software. They don't ever want competition.

That said, most things do quite well on 44khz/48khz When you consider that the highest note any soprano can sing is about 9khz that puts things in perspective. 'A' above middle C is 440Hz. One octave up is 880hz; another octave up 'A' is 1,760Hz. What you want to hear is actually well covered.

The Hi-Fi cards that do 192khz will have higher quality throughout, and produce lower THD, TID, etc distortion rates. Speakers often contribute significantly to the total distortion. So do capacitors.

If your 13 year old iMac sounds lousy on everybody's software, consider hardware problems.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Realtek HD Soundcard Cannot Play Back At Higher Than 48khz Sampling Rate under Linux cgrozev Linux - Hardware 13 03-16-2020 09:27 PM
Realtek HD Soundcard Cannot Play Back At Higher Than 48khz Sampling Rate under Linux cgrozev Linux - Software 2 03-14-2020 05:22 PM
How convert 24 bit 192khz Flac to 24 bit 48khz using the command line? AleLinuxBSD Linux - Software 0 11-15-2011 07:26 AM
Will 2.5 and/or XF86 "5" support 100Hz or higher refresh rates? tunes56 Linux - Newbie 2 04-12-2002 04:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook

All times are GMT -5. The time now is 01:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration