LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Closed Thread
  Search this Thread
Old 03-13-2020, 02:04 PM   #1
cgrozev
LQ Newbie
 
Registered: Mar 2020
Posts: 7

Rep: Reputation: Disabled
Realtek HD Soundcard Cannot Play Back At Higher Than 48khz Sampling Rate under Linux


Hi everyone.
I have been struggling to force my built-in Realtek ALC288 sound card to play at any sampling rate higher than 48khz. The card is built into an Asus Mini-PC-PN40, and is capable of 192khz sampling rate. Under Windows, it plays out at 192khz, but under Linux it appears capped at 48khz.
I assume this is due to the Linux Alsa system using Intel HD default sound card drivers instead of card-specific drivers, but I have not found a way to circumvent this restriction.
An example of the issue would be:
Code:
cg@debian:~$ speaker-test c2 -r 192000

speaker-test 1.1.8

Playback device is default
Stream parameters are 192000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
Rate set to 192000Hz (requested 192000Hz)
Buffer size range from 192 to 2097152
Period size range from 64 to 699051
Using max buffer size 2097152
Periods = 4
was set period_size = 524288
was set buffer_size = 2097152
 0 - Front Left
as you can see, the card "believes" it is playing at 192000 HZ.

Similarly, I can record a file at 192khz

Code:
cg@debian:~$ arecord -f S16_LE -r 192000 -d 30 testS16_LE.wav
Recording WAVE 'testS16_LE.wav' : Signed 16 bit Little Endian, Rate 192000 Hz, Mono
And the resulting file is 192khz, when checked with ffprobe.
The system "believes" it plays it out at 192khz:

Code:
cg@debian:~$ aplay testS16_LE.wav
Playing WAVE 'testS16_LE.wav' : Signed 16 bit Little Endian, Rate 192000 Hz, Mono
However, it does not - when I test the playout sampling rate at the time of playback, I get 48khz:

Code:
cg@debian:~$ cat /proc/asound/card0/pcm0p/sub0/hw_params
access: MMAP_INTERLEAVED
format: S16_LE
subformat: STD
channels: 2
rate: 48000 (48000/1)
period_size: 44100
buffer_size: 88200
Changing the Alsa default settings in the Alsa config files does not seem to have any effect.

Checking the sinks shows that the card is seen as 48khz only:
Code:
 pacmd list-sinks
1 sink(s) available.
  * index: 0
        name: <alsa_output.pci-0000_00_0e.0.analog-stereo>
        driver: <module-alsa-card.c>
        flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY FLAT_VOLUME DYNAMIC_LATENCY
        state: SUSPENDED
        suspend cause: IDLE
        priority: 9039
        volume: front-left: 30129 /  46% / -20.25 dB,   front-right: 30129 /  46% / -20.25 dB
                balance 0.00
        base volume: 65536 / 100% / 0.00 dB
        volume steps: 65537
        muted: no
        current latency: 0.00 ms
        max request: 0 KiB
        max rewind: 0 KiB
        monitor source: 0
        sample spec: s16le 2ch 48000Hz
        channel map: front-left,front-right
                     Stereo
        used by: 0
        linked by: 0
        configured latency: 0.00 ms; range is 0.50 .. 1837.50 ms
        card: 0 <alsa_card.pci-0000_00_0e.0>
        module: 6
        properties:
                alsa.resolution_bits = "16"
                device.api = "alsa"
                device.class = "sound"
                alsa.class = "generic"
                alsa.subclass = "generic-mix"
                alsa.name = "ALC255 Analog"
                alsa.id = "ALC255 Analog"
                alsa.subdevice = "0"
                alsa.subdevice_name = "subdevice #0"
                alsa.device = "0"
                alsa.card = "0"
                alsa.card_name = "HDA Intel PCH"
                alsa.long_card_name = "HDA Intel PCH at 0xa1210000 irq 128"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:00:0e.0"
                sysfs.path = "/devices/pci0000:00/0000:00:0e.0/sound/card0"
                device.bus = "pci"
                device.vendor.id = "8086"
                device.vendor.name = "Intel Corporation"
                device.product.id = "3198"
                device.form_factor = "internal"
                device.string = "front:0"
                device.buffering.buffer_size = "352800"
                device.buffering.fragment_size = "176400"
                device.access_mode = "mmap+timer"
                device.profile.name = "analog-stereo"
                device.profile.description = "Analog Stereo"
                device.description = "Built-in Audio Analog Stereo"
                alsa.mixer_name = "Realtek ALC255"
                alsa.components = "HDA:10ec0255,1043871d,00100002 HDA:8086280d,80860101,00100000"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
        ports:
                analog-output-headphones: Headphones (priority 9000, latency offset 0 usec, available: yes)
                        properties:
                                device.icon_name = "audio-headphones"
        active port: <analog-output-headphones>
It appears, if I read this correctly. that Linux uses a generic HDA Intel PCH card driver for the Realtek ALC255.
I am running this under Debian but the same effect exists in Ubuntu.

Any ideas what I can do to increase the playback sampling rate?

Thanks in advance!
Christo
 
Old 03-14-2020, 04:09 PM   #2
Gad
Member
 
Registered: May 2013
Distribution: FreeBSD
Posts: 566

Rep: Reputation: 114Reputation: 114
Hello and welcome to LQ

It sounds like a possible driver issue. A quick search on the net and I dont seem to see a driver for Linux, (Unless I am mistaken)

What flavour of Linux are you using?

Are you able to post the output of dmesg so we can see what is happening in the background?
 
Old 03-14-2020, 05:22 PM   #3
jeremy
root
 
Registered: Jun 2000
Distribution: Debian, Red Hat, Slackware, Fedora, Ubuntu
Posts: 13,605

Rep: Reputation: 4104Reputation: 4104Reputation: 4104Reputation: 4104Reputation: 4104Reputation: 4104Reputation: 4104Reputation: 4104Reputation: 4104Reputation: 4104Reputation: 4104
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.

https://www.linuxquestions.org/quest...ux-4175671256/
 
  


Closed Thread



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
[SOLVED] Down-sampling/re-sampling flac files ph73nt Linux - Software 2 11-23-2014 04:08 AM
host opens usb audio endpoint w/o explicitly setting sampling rate rebar Linux - General 3 04-30-2013 12:17 PM
What is the reasonable sampling rate for the wireless signal level? christyyim Linux - Wireless Networking 5 12-25-2008 02:10 AM
ALSA or OSS sampling rate change hisnumber666 Linux - Hardware 6 04-28-2006 02:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:53 AM.

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