LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 03-13-2020, 07:02 AM   #1
cgrozev
LQ Newbie
 
Registered: Mar 2020
Posts: 7

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


Hi. Have been struggling to force my Debian installation on Asus MiniPC to force the built-in soundcard with its full sampling rate potential, but I can't achieve it.
The soundcard is Realtek ALC255, and has sample rates up to 192khz.
When I play out audio, it allows me to set the sample rate at 192khz. See in the speaker test for example:

Code:
~$ speaker-test -c2 -r 192000

speaker-test 1.1.8

Playback device is default
Stream parameters are 192000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Rate set to 192000Hz (requested 192000Hz)
Buffer size range from 96 to 1048576
Period size range from 32 to 349526
Using max buffer size 1048576
Periods = 4
was set period_size = 262144
was set buffer_size = 1048576
 0 - Front Left
^C 1 - Front Right
Time per period = 2.750980
However, in reality it does not seem to play out at 192khz but at the maximum rate of the generic Intel soundcard driver: 48khz. As seen by this:

Code:
:~$ 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

So it appears that under Linux, the RealTek driver is not truly used, but instead a different (generic?) driver jumps in? Is there any way to force Linux (I tested the same under Ubuntu, same result) to use a higher sampling rate than that of the Intel HD driver? Or is there a different reason for the "cap" on the sampling rate?
Btw, I tried forcing a higher rate in the alsa config settings, no luck either.

Looking forward to any advice you may have.
Best regards
Christo
 
Old 03-14-2020, 03:30 PM   #2
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,841

Rep: Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148Reputation: 1148
I'm no audiophile, but this thread may be of interest to you.
 
Old 03-14-2020, 04:32 PM   #3
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-15.0
Posts: 2,713

Rep: Reputation: 1392Reputation: 1392Reputation: 1392Reputation: 1392Reputation: 1392Reputation: 1392Reputation: 1392Reputation: 1392Reputation: 1392Reputation: 1392
Not sure which version of debian you are using, but Pulseaudio will automatically resample all your audio to a set frequency and bitrate. You can disable resampling of your audio streams by editing /etc/pulse/daemon.conf and adding or editing this line if it already exist.

Code:
avoid-resampling = true
You might also want to change your sample rate from 16-bit to 24-bit. You can do this by adding or editing the line too.

Code:
default-sample-format = s24le
After you make these changes and restart pulseaudio, I would download a high resolution music file from here to confirm that your sound is not being resampled by pulseaudio anymore http://www.2l.no/hires/index.html
 
Old 03-15-2020, 04:36 AM   #4
cgrozev
LQ Newbie
 
Registered: Mar 2020
Posts: 7

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Daedra View Post
Not sure which version of debian you are using, but Pulseaudio will automatically resample all your audio to a set frequency and bitrate. You can disable resampling of your audio streams by editing /etc/pulse/daemon.conf and adding or editing this line if it already exist.

Code:
avoid-resampling = true
You might also want to change your sample rate from 16-bit to 24-bit. You can do this by adding or editing the line too.

Code:
default-sample-format = s24le
After you make these changes and restart pulseaudio, I would download a high resolution music file from here to confirm that your sound is not being resampled by pulseaudio anymore http://www.2l.no/hires/index.html
Unfortunately, no luck after changing enabling the avoid-resampling. The hi-res files still play at 48khz.

I do think it's a (missing) driver issue.

The OS is Debian 10.


In case this is useful, here are is the dmesg output linked to sound/audio:

Code:
[    4.866064] snd_hda_intel 0000:00:0e.0: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])

[    4.969226] snd_hda_codec_realtek hdaudioC0D0: autoconfig for ALC255: line_outs=1 (0x21/0x0/0x0/0x0/0x0) type:hp
[    4.969229] snd_hda_codec_realtek hdaudioC0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[    4.969230] snd_hda_codec_realtek hdaudioC0D0:    hp_outs=0 (0x0/0x0/0x0/0x0/0x0)
[    4.969231] snd_hda_codec_realtek hdaudioC0D0:    mono: mono_out=0x0
[    4.969232] snd_hda_codec_realtek hdaudioC0D0:    inputs:
[    4.969234] snd_hda_codec_realtek hdaudioC0D0:      Mic=0x19
[    5.239737] pstore: Using compression: deflate
[    5.239757] pstore: Registered efi as persistent store backend

[    5.352256] input: HDA Intel PCH Mic as /devices/pci0000:00/0000:00:0e.0/sound/card0/input9
[    5.358693] input: HDA Intel PCH Headphone as /devices/pci0000:00/0000:00:0e.0/sound/card0/input10
[    5.358757] input: HDA Intel PCH HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:0e.0/sound/card0/input11
[    5.358812] input: HDA Intel PCH HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:0e.0/sound/card0/input12
[    5.358861] input: HDA Intel PCH HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:0e.0/sound/card0/input13
[    5.358915] input: HDA Intel PCH HDMI/DP,pcm=9 as /devices/pci0000:00/0000:00:0e.0/sound/card0/input14
[    5.358966] input: HDA Intel PCH HDMI/DP,pcm=10 as /devices/pci0000:00/0000:00:0e.0/sound/card0/input15
[    5.367618] kvm: disabled by bios

Last edited by cgrozev; 03-15-2020 at 04:44 AM. Reason: adding dmesg extract
 
Old 03-15-2020, 03:16 PM   #5
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-15.0
Posts: 2,713

Rep: Reputation: 1392Reputation: 1392Reputation: 1392Reputation: 1392Reputation: 1392Reputation: 1392Reputation: 1392Reputation: 1392Reputation: 1392Reputation: 1392
can you post the contents of your /etc/pulse/daemon.conf?
 
Old 03-15-2020, 04:08 PM   #6
cgrozev
LQ Newbie
 
Registered: Mar 2020
Posts: 7

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Daedra View Post
can you post the contents of your /etc/pulse/daemon.conf?
Code:
 
; daemonize = no
; fail = yes
; allow-module-loading = yes
; allow-exit = yes
; use-pid-file = yes
; system-instance = no
; local-server-type = user
; enable-shm = yes
; enable-memfd = yes
; shm-size-bytes = 0 # setting this 0 will use the system-default, usually 64 MiB
; lock-memory = no
; cpu-limit = no

; high-priority = yes
; nice-level = -11

; realtime-scheduling = yes
; realtime-priority = 5

; exit-idle-time = 20
; scache-idle-time = 20

; dl-search-path = (depends on architecture)

; load-default-script-file = yes
; default-script-file = /etc/pulse/default.pa

; log-target = auto
; log-level = notice
; log-meta = no
; log-time = no
; log-backtrace = 0

; resample-method = speex-float-1
avoid-resampling = true
; enable-remixing = yes
; remixing-use-all-sink-channels = yes
; enable-lfe-remixing = no
; lfe-crossover-freq = 0

flat-volumes = no

; rlimit-fsize = -1
; rlimit-data = -1
; rlimit-stack = -1
; rlimit-core = -1
; rlimit-as = -1
; rlimit-rss = -1
; rlimit-nproc = -1
; rlimit-nofile = 256
; rlimit-memlock = -1
; rlimit-locks = -1
; rlimit-sigpending = -1
; rlimit-msgqueue = -1
; rlimit-nice = 31
; rlimit-rtprio = 9
; rlimit-rttime = 200000

; default-sample-format = s16le
default-sample-rate = 192000
; alternate-sample-rate = 48000
; default-sample-channels = 2
; default-channel-map = front-left,front-right

; default-fragments = 4
; default-fragment-size-msec = 25

; enable-deferred-volume = yes
deferred-volume-safety-margin-usec = 1
; deferred-volume-extra-delay-usec = 0

Also, disabling pulseaudio completely makes no difference.

Last edited by cgrozev; 03-15-2020 at 04:10 PM.
 
Old 03-15-2020, 04:57 PM   #7
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-15.0
Posts: 2,713

Rep: Reputation: 1392Reputation: 1392Reputation: 1392Reputation: 1392Reputation: 1392Reputation: 1392Reputation: 1392Reputation: 1392Reputation: 1392Reputation: 1392
One last thing, not sure if it will help, but you can you post the output of "pulseaudio --dump-conf". This is definitely odd, if you are disabling pulseaudio and running pure alsa it shouldn't resample.
 
Old 03-15-2020, 05:15 PM   #8
cgrozev
LQ Newbie
 
Registered: Mar 2020
Posts: 7

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Daedra View Post
One last thing, not sure if it will help, but you can you post the output of "pulseaudio --dump-conf". This is definitely odd, if you are disabling pulseaudio and running pure alsa it shouldn't resample.
Code:
daemonize = no
fail = yes
high-priority = yes
nice-level = -11
realtime-scheduling = yes
realtime-priority = 5
allow-module-loading = yes
allow-exit = yes
use-pid-file = yes
system-instance = no
local-server-type = user
cpu-limit = no
enable-shm = yes
flat-volumes = no
lock-memory = no
exit-idle-time = 20
scache-idle-time = 20
dl-search-path = /usr/lib/pulse-11.1/modules
default-script-file = /etc/pulse/default.pa
load-default-script-file = yes
log-target =
log-level = notice
resample-method = auto
avoid-resampling = no
enable-remixing = yes
remixing-use-all-sink-channels = yes
enable-lfe-remixing = no
lfe-crossover-freq = 0
default-sample-format = s16le
default-sample-rate = 192000
alternate-sample-rate = 44100
default-sample-channels = 2
default-channel-map = front-left,front-right
default-fragments = 4
default-fragment-size-msec = 25
enable-deferred-volume = yes
deferred-volume-safety-margin-usec = 1
deferred-volume-extra-delay-usec = 0
shm-size-bytes = 0
log-meta = no
log-time = no
log-backtrace = 0
rlimit-fsize = -1
rlimit-data = -1
rlimit-stack = -1
rlimit-core = -1
rlimit-rss = -1
rlimit-as = -1
rlimit-nproc = -1
rlimit-nofile = 256
rlimit-memlock = -1
rlimit-locks = -1
rlimit-sigpending = -1
rlimit-msgqueue = -1
rlimit-nice = 31
rlimit-rtprio = 9
rlimit-rttime = 200000
 
Old 03-15-2020, 06:48 PM   #9
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-15.0
Posts: 2,713

Rep: Reputation: 1392Reputation: 1392Reputation: 1392Reputation: 1392Reputation: 1392Reputation: 1392Reputation: 1392Reputation: 1392Reputation: 1392Reputation: 1392
Ok if you look at that output pulseaudio still has resampling enabled

Code:
avoid-resampling = no
This was my mistake, the correct option in daemon.conf should be "avoid-resampling = yes" not true. However it looks like you set the default sample rate to "default-sample-rate = 192000" So all your sound should be resampled to that high rate. I would try changing true to yes in the daemon.conf file and changing "default-sample-format = s16le" to "default-sample-format = s24le" and see if that makes any difference. Just be sure that your audio file has a true 192000 mhz sample rate to test with, you can get a test flac from the link I posted above. Sorry I can't be more help, its just this is all I ever do to get my music from being resampled.

also if you download that hi res flac from above, after you start playing it in a terminal run

Code:
watch -n1 cat /proc/asound/card0/pcm0p/sub0/hw_params
this will give you the information on sample rate and bitreate

Last edited by Daedra; 03-15-2020 at 06:57 PM.
 
Old 03-16-2020, 03:47 AM   #10
cgrozev
LQ Newbie
 
Registered: Mar 2020
Posts: 7

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Daedra View Post
Ok if you look at that output pulseaudio still has resampling enabled

Code:
avoid-resampling = no
This was my mistake, the correct option in daemon.conf should be "avoid-resampling = yes" not true. However it looks like you set the default sample rate to "default-sample-rate = 192000" So all your sound should be resampled to that high rate. I would try changing true to yes in the daemon.conf file and changing "default-sample-format = s16le" to "default-sample-format = s24le" and see if that makes any difference. Just be sure that your audio file has a true 192000 mhz sample rate to test with, you can get a test flac from the link I posted above. Sorry I can't be more help, its just this is all I ever do to get my music from being resampled.

also if you download that hi res flac from above, after you start playing it in a terminal run

Code:
watch -n1 cat /proc/asound/card0/pcm0p/sub0/hw_params
this will give you the information on sample rate and bitreate
Thanks - that's exactly how I check the actual sample rate. Whether or not I change the avoid-resampling to yes or no, it makes no difference. Generally, it's not a pulseaudio issue; the downsampling takes place at the alsa level.
 
Old 03-16-2020, 08:06 AM   #11
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
Quote:
downsampling takes place at the alsa level.
If you are sure you need a config for alsa have a look at making .asoundrc with a rate config
https://www.alsa-project.org/wiki/Asoundrc

BTW there it shows that if you have an appropiate wav file you can test it true rate by
Code:
aplay -v filename.wav
the trouble is...alsa does not support lots of audio formats.

Quote:
RealTek driver is not truly used, but instead a different (generic?) driver jumps in?
Where are you getting confirmation that you are using a realtek driver for audio?
You may be using a realtek codec and this you can see by running
Code:
lsmod | grep codec
please show the output of (you may need to install the package)
Code:
inxi -Axxx
Quote:
I will show mine....as example
Audio: Device-1: Advanced Micro Devices [AMD/ATI] Raven/Raven2/Fenghuang HDMI/DP Audio driver: snd_hda_intel v: kernel
bus ID: 26:00.1 chip ID: 1002:15de
Device-2: Advanced Micro Devices [AMD] Family 17h HD Audio vendor: Micro-Star MSI driver: snd_hda_intel v: kernel
bus ID: 26:00.6 chip ID: 1022:15e3
Sound Server: ALSA v: k5.4.0-4-amd64
If your distro does not have it....and you can not be bothered installing it from source
https://smxi.org/site/install.htm#inxi

then running
Code:
lspci -vvv
and scroll down to Audio and see what kernel driver is being used.
 
Old 03-16-2020, 08:56 AM   #12
cgrozev
LQ Newbie
 
Registered: Mar 2020
Posts: 7

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by aus9 View Post
If you are sure you need a config for alsa have a look at making .asoundrc with a rate config
https://www.alsa-project.org/wiki/Asoundrc
I already tried this, with many different settings.
When I use a simple "fixed rate" setting such as this:


Code:
pcm.!default {
    type hw
    card 0
    rate 192000
}
ctl.!default {
    type hw
    card 0
}

I can no longer play a 192khz file. Here's the output from aplay -v filename.wav:

Code:
cg@cg-PN40:~$ aplay -v test02.wav
Playing WAVE 'test02.wav' : Signed 16 bit Little Endian, Rate 192000 Hz, Stereo
aplay: set_params:1270: Broken configuration for this PCM: no configurations available


When I run aplay -v on the same file WITHOUT the asound.rc file, here is the output:


Code:
cg@cg-PN40:~$ aplay -v test02.wav
Playing WAVE 'test02.wav' : Signed 16 bit Little Endian, Rate 192000 Hz, Stereo
Plug PCM: Rate conversion PCM (48000, sformat=S32_LE)
Converter: libspeex (external)
Protocol version: 10002
Its setup is:
  stream       : PLAYBACK
  access       : RW_INTERLEAVED
  format       : S16_LE
  subformat    : STD
  channels     : 2
  rate         : 192000
  exact rate   : 192000 (192000/1)
  msbits       : 16
  buffer_size  : 65536
  period_size  : 4096
  period_time  : 21333
  tstamp_mode  : NONE
  tstamp_type  : MONOTONIC
  period_step  : 1
  avail_min    : 4096
  period_event : 0
  start_threshold  : 65536
  stop_threshold   : 65536
  silence_threshold: 0
  silence_size : 0
  boundary     : 4611686018427387904
Slave: Soft volume PCM
Control: PCM Playback Volume
min_dB: -51
max_dB: 0
resolution: 256
Its setup is:
  stream       : PLAYBACK
  access       : MMAP_INTERLEAVED
  format       : S32_LE
  subformat    : STD
  channels     : 2
  rate         : 48000
  exact rate   : 48000 (48000/1)
  msbits       : 32
  buffer_size  : 16384
  period_size  : 1024
  period_time  : 21333
  tstamp_mode  : NONE
  tstamp_type  : MONOTONIC
  period_step  : 1
  avail_min    : 1024
  period_event : 0
  start_threshold  : 16384
  stop_threshold   : 16384
  silence_threshold: 0
  silence_size : 0
  boundary     : 4611686018427387904
Slave: Direct Stream Mixing PCM
Its setup is:
  stream       : PLAYBACK
  access       : MMAP_INTERLEAVED
  format       : S32_LE
  subformat    : STD
  channels     : 2
  rate         : 48000
  exact rate   : 48000 (48000/1)
  msbits       : 32
  buffer_size  : 16384
  period_size  : 1024
  period_time  : 21333
  tstamp_mode  : NONE
  tstamp_type  : MONOTONIC
  period_step  : 1
  avail_min    : 1024
  period_event : 0
  start_threshold  : 16384
  stop_threshold   : 16384
  silence_threshold: 0
  silence_size : 0
  boundary     : 4611686018427387904
Hardware PCM card 0 'HDA Intel PCH' device 0 subdevice 0
Its setup is:
  stream       : PLAYBACK
  access       : MMAP_INTERLEAVED
  format       : S32_LE
  subformat    : STD
  channels     : 2
  rate         : 48000
  exact rate   : 48000 (48000/1)
  msbits       : 32
  buffer_size  : 16384
  period_size  : 1024
  period_time  : 21333
  tstamp_mode  : ENABLE
  tstamp_type  : MONOTONIC
  period_step  : 1
  avail_min    : 1024
  period_event : 0
  start_threshold  : 1
  stop_threshold   : 4611686018427387904
  silence_threshold: 0
  silence_size : 4611686018427387904
  boundary     : 4611686018427387904
  appl_ptr     : 0
  hw_ptr       : 0
Quote:

Where are you getting confirmation that you are using a realtek driver for audio?
You may be using a realtek codec and this you can see by running
Code:
lsmod | grep codec
Here it is:

Code:
snd_hda_codec_hdmi     61440  1
snd_hda_codec_realtek   118784  1
snd_hda_codec_generic    81920  1 snd_hda_codec_realtek
ledtrig_audio          16384  3 snd_hda_codec_generic,snd_hda_codec_realtek,snd_sof
snd_hda_codec         139264  5 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek,snd_soc_hdac_hda
snd_hda_core           90112  9 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_ext_core,snd_hda_codec,snd_hda_codec_realtek,snd_sof_intel_hda_common,snd_soc_hdac_hda,snd_sof_intel_hda
snd_hwdep              20480  1 snd_hda_codec
snd_pcm               114688  8 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_sof,snd_sof_intel_hda_common,snd_soc_core,snd_hda_core,snd_pcm_dmaengine
snd                    90112  19 snd_hda_codec_generic,snd_seq,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_compress,snd_soc_core,snd_pcm,snd_rawmidi
Note that this file was created using the same sound card, so the chip does permit 192khz (and in any case, the same soundcard does produce 192khz in playback under windows, so it's not a hardware limitation).

Quote:



please show the output of (you may need to install the package)
Code:
inxi -Axxx
Code:
Audio:     Card Intel Device 3198 driver: snd_hda_intel bus-ID: 00:0e.0 chip-ID: 8086:3198
           Sound: Advanced Linux Sound Architecture v: k5.5.9-050509-lowlatency
Quote:


then running
Code:
lspci -vvv
and scroll down to Audio and see what kernel driver is being used.

Code:
00:0e.0 Audio device: Intel Corporation Device 3198 (rev 03)
        Subsystem: ASUSTeK Computer Inc. Device 871d
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0, Cache Line Size: 64 bytes
        Interrupt: pin A routed to IRQ 132
        Region 0: Memory at a1210000 (64-bit, non-prefetchable) [size=16K]
        Region 4: Memory at a1000000 (64-bit, non-prefetchable) [size=1M]
        Capabilities: <access denied>
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd_hda_intel, snd_sof_pci


Btw, I changed the OS flavor to Ubuntu 18.04, and upgraded the kernel to 5.5.9-050509-lowlatency - still no luck.

UPDATE: I have uploaded the debug info from alsa-info here: http://alsa-project.org/db/?f=7a3438...9cc993490bc01b

I am not sure how to read this, but I notice that while the default PCM has rates up to 192khz, the "Audio Output" nodes have rates of only 44.1 and 48 khz.

Code:
Codec: Realtek ALC255
Address: 0
AFG Function Id: 0x1 (unsol 1)
Vendor Id: 0x10ec0255
Subsystem Id: 0x1043871d
Revision Id: 0x100002
No Modem Function Group found
Default PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
Default Amp-In caps: N/A
Default Amp-Out caps: N/A
State of AFG node 0x01:
  Power states:  D0 D1 D2 D3 D3cold CLKSTOP EPSS
  Power: setting=D0, actual=D0
GPIO: io=3, o=0, i=0, unsolicited=1, wake=0
  IO[0]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
  IO[1]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
  IO[2]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
Node 0x02 [Audio Output] wcaps 0x41d: Stereo Amp-Out
  Control: name="Master Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Device: name="ALC255 Analog", type="Audio", device=0
  Amp-Out caps: ofs=0x57, nsteps=0x57, stepsize=0x02, mute=0
  Amp-Out vals:  [0x3c 0x3c]
  Converter: stream=0, channel=0
  PCM:
    rates [0x60]: 44100 48000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
Node 0x03 [Audio Output] wcaps 0x41d: Stereo Amp-Out
  Amp-Out caps: ofs=0x57, nsteps=0x57, stepsize=0x02, mute=0
  Amp-Out vals:  [0x57 0x57]
  Converter: stream=0, channel=0
  PCM:
    rates [0x60]: 44100 48000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0

Last edited by cgrozev; 03-16-2020 at 10:49 AM.
 
Old 03-16-2020, 08:48 PM   #13
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
yeah well my first suggestion is add a bit rate to your .asoundrc new post below

but I noticed your output for grep codec differs from mine.

Code:
NOT the OP
lsmod | grep codec
snd_hda_codec_realtek   126976  1
snd_hda_codec_generic    94208  1 snd_hda_codec_realtek
ledtrig_audio          16384  2 snd_hda_codec_generic,snd_hda_codec_realtek
snd_hda_codec_hdmi     73728  1
snd_hda_codec         155648  4 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek
snd_hda_core           98304  5 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek
snd_hwdep              16384  1 snd_hda_codec
snd_pcm               118784  4 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_core
snd                    98304  14 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_pcm
You have a beast called snd_sof

I have a different kernel to you but I am sure you will get my drift.

modinfo snd_sod did not enlighten me at all but this looks more useful

Code:
strings /lib/modules/5.4.0-4-amd64/kernel/sound/soc/sof/snd-sof.ko | grep DSP
error: failed to probe DSP %d
error: failed to init DSP trace/debug %d
error: failed to init DSP IPC %d
error: failed to load DSP firmware %d
error: failed to boot DSP firmware %d
error: failed to register DSP DAI driver %d
ipc: DSP is ready 0x%8.8x offset 0x%x
error: unknown DSP message 0x%x
error: failed to load DSP topology %d
error: failed to power down DSP during suspend %d
error: failed to power up DSP after resume
error: failed to load DSP firmware after resume %d
error: failed to boot DSP firmware after resume %d
error: debugfs entry cannot be read in DSP D3
error: DSP failed to add route sink %s control %s source %s result %d
error: DSP failed to add widget id %d type %d name : %s stream %s reply %d
error: DSP sent %zu bytes max is %d
error: DSP trace buffer overflow %u bytes. Total messages %d
error : DSP panic!
booting DSP firmware
error: failed to reset DSP
OK so they are options.....lets eliminate missing firmware

Code:
sudo dmesg | grep firmware
do not post all output....mine contains hits for APU/CPU and networking firmware.

We are interested in you show output for any firmware you do not recognise please. and I am guessing the firware appears here.....again I have not researched your setup

DSP is only one factor in the process...but for reasons I have not researched your device yet....you need snd_sof.

Now looking at the source...
https://github.com/thesofproject/sof

You will see "family" or codenames for CPU such as Haswell. So do you know your CPU codename?

it might help to post output of
Code:
inxi -Cxxx

Last edited by aus9; 03-16-2020 at 09:25 PM.
 
Old 03-16-2020, 09:27 PM   #14
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
I have not played with format 24 bit or such so had to relook at the man page

we may attempt to add format to your .asoundrc

example of which poster used format S24_3LE...altho a lower rate.
https://forums.gentoo.org/viewtopic-...8-start-0.html

Code:
man aplay
gives us

Quote:
-f --format=FORMAT
Sample format
Recognized sample formats are: S8 U8 S16_LE S16_BE U16_LE U16_BE S24_LE S24_BE U24_LE U24_BE S32_LE S32_BE U32_LE U32_BE FLOAT_LE FLOAT_BE
FLOAT64_LE FLOAT64_BE IEC958_SUBFRAME_LE IEC958_SUBFRAME_BE MU_LAW A_LAW IMA_ADPCM MPEG GSM SPECIAL S24_3LE S24_3BE U24_3LE U24_3BE S20_3LE
S20_3BE U20_3LE U20_3BE S18_3LE S18_3BE U18_3LE
Some of these may not be available on selected hardware
The available format shortcuts are:
-f cd (16 bit little endian, 44100, stereo) [-f S16_LE -c2 -r44100]
-f cdr (16 bit big endian, 44100, stereo) [-f S16_BE -c2 -f44100]
-f dat (16 bit little endian, 48000, stereo) [-f S16_LE -c2 -r48000]
If no format is given U8 is used
and I relooked OP and your format is S16_LE

Last edited by aus9; 03-16-2020 at 09:30 PM.
 
  


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 - Software 2 03-14-2020 05:22 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 - Hardware

All times are GMT -5. The time now is 04:59 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