You are not logged in.
I followed this guide: https://wiki.archlinux.org/index.php/Ad … und.state) to reset the Alsa settings but my bit resolution keeps being set to 32. When I run
pacmd list-sinks
I get:
1 sink(s) available.
* index: 0
name: <alsa_output.1.analog-stereo>
driver: <module-alsa-sink.c>
flags: HARDWARE DECIBEL_VOLUME LATENCY
state: IDLE
suspend cause: (none)
priority: 9039
volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB
balance 0.00
base volume: 65536 / 100% / 0.00 dB
volume steps: 65537
muted: no
current latency: 15.17 ms
max request: 22 KiB
max rewind: 22 KiB
monitor source: 0
sample spec: s32le 2ch 192000Hz
channel map: front-left,front-right
Stereo
used by: 0
linked by: 0
fixed latency: 15.00 ms
module: 6
properties:
alsa.resolution_bits = "32"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = "ALC887-VD Analog"
alsa.id = "ALC887-VD Analog"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "0"
alsa.card = "1"
alsa.card_name = "HD-Audio Generic"
alsa.long_card_name = "HD-Audio Generic at 0xfcb00000 irq 104"
alsa.driver_name = "snd_hda_intel"
device.bus_path = "pci-0000:0b:00.4"
sysfs.path = "/devices/pci0000:00/0000:00:08.1/0000:0b:00.4/sound/card1"
device.bus = "pci"
device.vendor.id = "1022"
device.vendor.name = "Advanced Micro Devices, Inc. [AMD]"
device.product.id = "1487"
device.product.name = "Starship/Matisse HD Audio Controller"
device.string = "front:1"
device.buffering.buffer_size = "23040"
device.buffering.fragment_size = "7680"
device.access_mode = "mmap"
device.profile.name = "analog-stereo"
device.profile.description = "Analog Stereo"
device.description = "Starship/Matisse HD Audio Controller Analog Stereo"
alsa.mixer_name = "Realtek ALC887-VD"
alsa.components = "HDA:10ec0887,1458a184,00100302"
device.icon_name = "audio-card-analog-pci"
even though my /etc/pulse/daemon.conf is:
resample-method = speex-float-5
flat-volumes = no
default-sample-format = s24le
default-sample-rate = 192000
default-fragments = 3
default-fragment-size-msec = 5
I want the bit resolution to be 24 but the alsa sink keeps reporting the alsa.resolution_bits as 32. So either I'm not following the directions correctly, the default is being misread, or something else I'm not seeing.
Last edited by mjd119 (2020-10-19 16:07:13)
Offline
I'm guessing the hardware can't do 24 bit. It perhaps only can do 16 and 32 bit formats?
You can check out what the hardware can do in the files named "/proc/asound/card*/codec#*". You can first find out which of the card* folders are your motherboard's device like this:
$ tail /proc/asound/card*/id
==> /proc/asound/card0/id <==
HDMI
==> /proc/asound/card1/id <==
Generic
This example means that for me here the motherboard is "card1", the graphics card is "card0".
I can then check the "codec#*" file in that "card1" folder:
less /proc/asound/card1/codec*
The interesting stuff I see here is:
Codec: Realtek ALC1220
...
Node 0x02 [Audio Output] wcaps 0x41d: Stereo Amp-Out
Control: name="Front Playback Volume", index=0, device=0
...
Device: name="ALC1220 Analog", type="Audio", device=0
...
PCM:
rates [0x7e0]: 44100 48000 88200 96000 176400 192000
bits [0x1e]: 16 20 24 32
formats [0x1]: PCM
...
...
...
Node 0x06 [Audio Output] wcaps 0x611: Stereo Digital
...
Device: name="ALC1220 Digital", type="SPDIF", device=1
...
PCM:
rates [0x5f0]: 32000 44100 48000 88200 96000 192000
bits [0xe]: 16 20 24
formats [0x1]: PCM
...
For the "card0" device that's my graphics card (meaning my monitor's speakers), I see this here:
Codec: ATI R6xx HDMI
...
Default PCM:
rates [0x70]: 32000 44100 48000
bits [0x2]: 16
formats [0x1]: PCM
...
Offline
For these values to be accurate you have to be playing something, do you know that your card actually supports 24le ? pulse will only honor this for cards that actually support what you are specifying.
If you want to know what your card supports, cease all playback (and since you seemingly disabled suspension, stop pulseaudio), compile
/*
* hw_params.c - print hardware capabilities
*
* compile with: gcc -o hw_params hw_params.c -lasound
*/
#include <stdio.h>
#include <alsa/asoundlib.h>
#define ARRAY_SIZE(a) (sizeof(a) / sizeof *(a))
static const snd_pcm_access_t accesses[] = {
SND_PCM_ACCESS_MMAP_INTERLEAVED,
SND_PCM_ACCESS_MMAP_NONINTERLEAVED,
SND_PCM_ACCESS_MMAP_COMPLEX,
SND_PCM_ACCESS_RW_INTERLEAVED,
SND_PCM_ACCESS_RW_NONINTERLEAVED,
};
static const snd_pcm_format_t formats[] = {
SND_PCM_FORMAT_S8,
SND_PCM_FORMAT_U8,
SND_PCM_FORMAT_S16_LE,
SND_PCM_FORMAT_S16_BE,
SND_PCM_FORMAT_U16_LE,
SND_PCM_FORMAT_U16_BE,
SND_PCM_FORMAT_S24_LE,
SND_PCM_FORMAT_S24_BE,
SND_PCM_FORMAT_U24_LE,
SND_PCM_FORMAT_U24_BE,
SND_PCM_FORMAT_S32_LE,
SND_PCM_FORMAT_S32_BE,
SND_PCM_FORMAT_U32_LE,
SND_PCM_FORMAT_U32_BE,
SND_PCM_FORMAT_FLOAT_LE,
SND_PCM_FORMAT_FLOAT_BE,
SND_PCM_FORMAT_FLOAT64_LE,
SND_PCM_FORMAT_FLOAT64_BE,
SND_PCM_FORMAT_IEC958_SUBFRAME_LE,
SND_PCM_FORMAT_IEC958_SUBFRAME_BE,
SND_PCM_FORMAT_MU_LAW,
SND_PCM_FORMAT_A_LAW,
SND_PCM_FORMAT_IMA_ADPCM,
SND_PCM_FORMAT_MPEG,
SND_PCM_FORMAT_GSM,
SND_PCM_FORMAT_SPECIAL,
SND_PCM_FORMAT_S24_3LE,
SND_PCM_FORMAT_S24_3BE,
SND_PCM_FORMAT_U24_3LE,
SND_PCM_FORMAT_U24_3BE,
SND_PCM_FORMAT_S20_3LE,
SND_PCM_FORMAT_S20_3BE,
SND_PCM_FORMAT_U20_3LE,
SND_PCM_FORMAT_U20_3BE,
SND_PCM_FORMAT_S18_3LE,
SND_PCM_FORMAT_S18_3BE,
SND_PCM_FORMAT_U18_3LE,
SND_PCM_FORMAT_U18_3BE,
};
static const unsigned int rates[] = {
5512,
8000,
11025,
16000,
22050,
32000,
44100,
48000,
64000,
88200,
96000,
176400,
192000,
};
int main(int argc, char *argv[])
{
const char *device_name = "hw";
snd_pcm_t *pcm;
snd_pcm_hw_params_t *hw_params;
unsigned int i;
unsigned int min, max;
int any_rate;
int err;
if (argc > 1)
device_name = argv[1];
err = snd_pcm_open(&pcm, device_name, SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK);
if (err < 0) {
fprintf(stderr, "cannot open device '%s': %s\n", device_name, snd_strerror(err));
return 1;
}
snd_pcm_hw_params_alloca(&hw_params);
err = snd_pcm_hw_params_any(pcm, hw_params);
if (err < 0) {
fprintf(stderr, "cannot get hardware parameters: %s\n", snd_strerror(err));
snd_pcm_close(pcm);
return 1;
}
printf("Device: %s (type: %s)\n", device_name, snd_pcm_type_name(snd_pcm_type(pcm)));
printf("Access types:");
for (i = 0; i < ARRAY_SIZE(accesses); ++i) {
if (!snd_pcm_hw_params_test_access(pcm, hw_params, accesses[i]))
printf(" %s", snd_pcm_access_name(accesses[i]));
}
putchar('\n');
printf("Formats:");
for (i = 0; i < ARRAY_SIZE(formats); ++i) {
if (!snd_pcm_hw_params_test_format(pcm, hw_params, formats[i]))
printf(" %s", snd_pcm_format_name(formats[i]));
}
putchar('\n');
err = snd_pcm_hw_params_get_channels_min(hw_params, &min);
if (err < 0) {
fprintf(stderr, "cannot get minimum channels count: %s\n", snd_strerror(err));
snd_pcm_close(pcm);
return 1;
}
err = snd_pcm_hw_params_get_channels_max(hw_params, &max);
if (err < 0) {
fprintf(stderr, "cannot get maximum channels count: %s\n", snd_strerror(err));
snd_pcm_close(pcm);
return 1;
}
printf("Channels:");
for (i = min; i <= max; ++i) {
if (!snd_pcm_hw_params_test_channels(pcm, hw_params, i))
printf(" %u", i);
}
putchar('\n');
err = snd_pcm_hw_params_get_rate_min(hw_params, &min, NULL);
if (err < 0) {
fprintf(stderr, "cannot get minimum rate: %s\n", snd_strerror(err));
snd_pcm_close(pcm);
return 1;
}
err = snd_pcm_hw_params_get_rate_max(hw_params, &max, NULL);
if (err < 0) {
fprintf(stderr, "cannot get maximum rate: %s\n", snd_strerror(err));
snd_pcm_close(pcm);
return 1;
}
printf("Sample rates:");
if (min == max)
printf(" %u", min);
else if (!snd_pcm_hw_params_test_rate(pcm, hw_params, min + 1, 0))
printf(" %u-%u", min, max);
else {
any_rate = 0;
for (i = 0; i < ARRAY_SIZE(rates); ++i) {
if (!snd_pcm_hw_params_test_rate(pcm, hw_params, rates[i], 0)) {
any_rate = 1;
printf(" %u", rates[i]);
}
}
if (!any_rate)
printf(" %u-%u", min, max);
}
putchar('\n');
err = snd_pcm_hw_params_get_period_time_min(hw_params, &min, NULL);
if (err < 0) {
fprintf(stderr, "cannot get minimum period time: %s\n", snd_strerror(err));
snd_pcm_close(pcm);
return 1;
}
err = snd_pcm_hw_params_get_period_time_max(hw_params, &max, NULL);
if (err < 0) {
fprintf(stderr, "cannot get maximum period time: %s\n", snd_strerror(err));
snd_pcm_close(pcm);
return 1;
}
printf("Interrupt interval: %u-%u us\n", min, max);
err = snd_pcm_hw_params_get_buffer_time_min(hw_params, &min, NULL);
if (err < 0) {
fprintf(stderr, "cannot get minimum buffer time: %s\n", snd_strerror(err));
snd_pcm_close(pcm);
return 1;
}
err = snd_pcm_hw_params_get_buffer_time_max(hw_params, &max, NULL);
if (err < 0) {
fprintf(stderr, "cannot get maximum buffer time: %s\n", snd_strerror(err));
snd_pcm_close(pcm);
return 1;
}
printf("Buffer size: %u-%u us\n", min, max);
snd_pcm_close(pcm);
return 0;
}
this piece of code, run
./hw_params hw:1
post/check the output. I still think you are chasing a red herring here with an issue that doesn't seem software related, and you do many misguided changes in an attempt to resolve them. I still think the best "test" you can do here is stop pulseaudio, configure MPD to directly access hw:1 and check if you can still reproduce the high CPU crackling issue. If you can you can knock yourself out however you want it's unlikely you'll be able to fix this with pulseaudio configuration.
Last edited by V1del (2020-06-27 20:34:23)
Offline
When I run
most /proc/asound/card1/codec*
I get:
Codec: Realtek ALC887-VD
Address: 0
AFG Function Id: 0x1 (unsol 1)
Vendor Id: 0x10ec0887
Subsystem Id: 0x1458a184
Revision Id: 0x100302
No Modem Function Group found
Default PCM:
rates [0x5f0]: 32000 44100 48000 88200 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 CLKSTOP EPSS
Power: setting=D0, actual=D0
GPIO: io=2, 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
Node 0x02 [Audio Output] wcaps 0x41d: Stereo Amp-Out
Control: name="Front Playback Volume", index=0, device=0
ControlAmp: chs=3, dir=Out, idx=0, ofs=0
Device: name="ALC887-VD Analog", type="Audio", device=0
Amp-Out caps: ofs=0x40, nsteps=0x40, stepsize=0x03, mute=0
Amp-Out vals: [0x40 0x40]
Converter: stream=5, channel=0
PCM:
rates [0x560]: 44100 48000 96000 192000
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
Control: name="Surround Playback Volume", index=0, device=0
ControlAmp: chs=3, dir=Out, idx=0, ofs=0
Amp-Out caps: ofs=0x40, nsteps=0x40, stepsize=0x03, mute=0
Amp-Out vals: [0x40 0x40]
Converter: stream=5, channel=0
PCM:
rates [0x560]: 44100 48000 96000 192000
bits [0xe]: 16 20 24
formats [0x1]: PCM
Power states: D0 D1 D2 D3 EPSS
Power: setting=D0, actual=D0
Node 0x04 [Audio Output] wcaps 0x41d: Stereo Amp-Out
Control: name="Center Playback Volume", index=0, device=0
ControlAmp: chs=1, dir=Out, idx=0, ofs=0
Control: name="LFE Playback Volume", index=0, device=0
ControlAmp: chs=2, dir=Out, idx=0, ofs=0
Amp-Out caps: ofs=0x40, nsteps=0x40, stepsize=0x03, mute=0
Amp-Out vals: [0x40 0x40]
Converter: stream=5, channel=0
PCM:
rates [0x560]: 44100 48000 96000 192000
bits [0xe]: 16 20 24
formats [0x1]: PCM
Power states: D0 D1 D2 D3 EPSS
Power: setting=D0, actual=D0
Node 0x05 [Audio Output] wcaps 0x41d: Stereo Amp-Out
Control: name="Headphone Playback Volume", index=0, device=0
ControlAmp: chs=3, dir=Out, idx=0, ofs=0
Amp-Out caps: ofs=0x40, nsteps=0x40, stepsize=0x03, mute=0
Amp-Out vals: [0x40 0x40]
Converter: stream=5, channel=0
PCM:
rates [0x560]: 44100 48000 96000 192000
bits [0xe]: 16 20 24
formats [0x1]: PCM
Power states: D0 D1 D2 D3 EPSS
Power: setting=D0, actual=D0
Node 0x06 [Audio Output] wcaps 0x611: Stereo Digital
Converter: stream=0, channel=0
Digital:
Digital category: 0x0
IEC Coding Type: 0x0
PCM:
rates [0x5f0]: 32000 44100 48000 88200 96000 192000
bits [0xe]: 16 20 24
formats [0x1]: PCM
Power states: D0 D1 D2 D3 EPSS
Power: setting=D0, actual=D0
Node 0x07 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x08 [Audio Input] wcaps 0x10051b: Stereo Amp-In
Control: name="Capture Volume", index=0, device=0
ControlAmp: chs=3, dir=In, idx=0, ofs=0
Control: name="Capture Switch", index=0, device=0
ControlAmp: chs=3, dir=In, idx=0, ofs=0
Device: name="ALC887-VD Analog", type="Audio", device=0
Amp-In caps: ofs=0x10, nsteps=0x2e, stepsize=0x03, mute=1
Amp-In vals: [0x1c 0x1c]
Converter: stream=1, channel=0
SDI-Select: 0
PCM:
rates [0x560]: 44100 48000 96000 192000
bits [0xe]: 16 20 24
formats [0x1]: PCM
Power states: D0 D1 D2 D3 EPSS
Power: setting=D0, actual=D0
Connection: 1
0x23
Node 0x09 [Audio Input] wcaps 0x10051b: Stereo Amp-In
Control: name="Capture Volume", index=1, device=0
ControlAmp: chs=3, dir=In, idx=0, ofs=0
Control: name="Capture Switch", index=1, device=0
ControlAmp: chs=3, dir=In, idx=0, ofs=0
Device: name="ALC887-VD Alt Analog", type="Audio", device=2
Amp-In caps: ofs=0x10, nsteps=0x2e, stepsize=0x03, mute=1
Amp-In vals: [0x80 0x80]
Converter: stream=0, channel=0
SDI-Select: 0
PCM:
rates [0x560]: 44100 48000 96000 192000
bits [0xe]: 16 20 24
formats [0x1]: PCM
Power states: D0 D1 D2 D3 EPSS
Power: setting=D0, actual=D0
Connection: 1
0x22
Node 0x0a [Audio Input] wcaps 0x100711: Stereo Digital
Converter: stream=0, channel=0
SDI-Select: 0
Digital:
Digital category: 0x0
IEC Coding Type: 0x0
PCM:
rates [0x560]: 44100 48000 96000 192000
bits [0xe]: 16 20 24
formats [0x1]: PCM
Power states: D0 D1 D2 D3 EPSS
Power: setting=D0, actual=D0
Connection: 1
0x1f
Node 0x0b [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
Control: name="Front Mic Playback Volume", index=0, device=0
ControlAmp: chs=3, dir=In, idx=1, ofs=0
Control: name="Front Mic Playback Switch", index=0, device=0
ControlAmp: chs=3, dir=In, idx=1, ofs=0
Control: name="Rear Mic Playback Volume", index=0, device=0
ControlAmp: chs=3, dir=In, idx=0, ofs=0
Control: name="Rear Mic Playback Switch", index=0, device=0
ControlAmp: chs=3, dir=In, idx=0, ofs=0
Control: name="Line Playback Volume", index=0, device=0
ControlAmp: chs=3, dir=In, idx=2, ofs=0
Control: name="Line Playback Switch", index=0, device=0
ControlAmp: chs=3, dir=In, idx=2, ofs=0
Amp-In caps: ofs=0x17, nsteps=0x1f, stepsize=0x05, mute=1
Amp-In vals: [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80]
Connection: 10
0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x14 0x15 0x16 0x17
Node 0x0c [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-In vals: [0x00 0x00] [0x80 0x80]
Connection: 2
0x02 0x0b
Node 0x0d [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-In vals: [0x80 0x80] [0x80 0x80]
Connection: 2
0x03 0x0b
Node 0x0e [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-In vals: [0x80 0x80] [0x80 0x80]
Connection: 2
0x04 0x0b
Node 0x0f [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-In vals: [0x00 0x00] [0x80 0x80]
Connection: 2
0x05 0x0b
Node 0x10 [Audio Output] wcaps 0x611: Stereo Digital
Converter: stream=0, channel=0
Digital:
Digital category: 0x0
IEC Coding Type: 0x0
PCM:
rates [0x5f0]: 32000 44100 48000 88200 96000 192000
bits [0xe]: 16 20 24
formats [0x1]: PCM
Power states: D0 D1 D2 D3 EPSS
Power: setting=D0, actual=D0
Node 0x11 [Pin Complex] wcaps 0x400781: Stereo Digital
Pincap 0x00000010: OUT
Pin Default 0x4037c040: [N/A] CD at Ext N/A
Conn = Analog, Color = UNKNOWN
DefAssociation = 0x4, Sequence = 0x0
Pin-ctls: 0x40: OUT
Unsolicited: tag=00, enabled=0
Power states: D0 D1 D2 D3 EPSS
Power: setting=D0, actual=D0
Connection: 1
0x10
Node 0x12 [Pin Complex] wcaps 0x400401: Stereo
Pincap 0x00000020: IN
Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
Conn = 1/8, Color = Black
DefAssociation = 0xf, Sequence = 0x0
Misc = NO_PRESENCE
Pin-ctls: 0x00:
Power states: D0 D1 D2 D3 EPSS
Power: setting=D0, actual=D0
Node 0x13 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x14 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
Control: name="Front Playback Switch", index=0, device=0
ControlAmp: chs=3, dir=Out, idx=0, ofs=0
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x00 0x00]
Pincap 0x0001003e: IN OUT HP EAPD Detect Trigger
EAPD 0x2: EAPD
Pin Default 0x01014010: [Jack] Line Out at Ext Rear
Conn = 1/8, Color = Green
DefAssociation = 0x1, Sequence = 0x0
Pin-ctls: 0x00:
Unsolicited: tag=05, enabled=1
Power states: D0 D1 D2 D3 EPSS
Power: setting=D0, actual=D0
Connection: 1
0x0c
Node 0x15 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x80 0x80]
Pincap 0x00000036: IN OUT Detect Trigger
Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
Conn = 1/8, Color = Black
DefAssociation = 0xf, Sequence = 0x0
Misc = NO_PRESENCE
Pin-ctls: 0x20: IN
Unsolicited: tag=00, enabled=0
Power states: D0 D1 D2 D3 EPSS
Power: setting=D0, actual=D0
Connection: 1
0x0d
Node 0x16 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x80 0x80]
Pincap 0x00000036: IN OUT Detect Trigger
Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
Conn = 1/8, Color = Black
DefAssociation = 0xf, Sequence = 0x0
Misc = NO_PRESENCE
Pin-ctls: 0x20: IN
Unsolicited: tag=00, enabled=0
Power states: D0 D1 D2 D3 EPSS
Power: setting=D0, actual=D0
Connection: 1
0x0e
Node 0x17 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x80 0x80]
Pincap 0x00000036: IN OUT Detect Trigger
Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
Conn = 1/8, Color = Black
DefAssociation = 0xf, Sequence = 0x0
Misc = NO_PRESENCE
Pin-ctls: 0x20: IN
Unsolicited: tag=00, enabled=0
Power states: D0 D1 D2 D3 EPSS
Power: setting=D0, actual=D0
Connection: 1
0x0f
Node 0x18 [Pin Complex] wcaps 0x40058f: Stereo Amp-In Amp-Out
Control: name="Center Playback Switch", index=0, device=0
ControlAmp: chs=1, dir=Out, idx=0, ofs=0
Control: name="LFE Playback Switch", index=0, device=0
ControlAmp: chs=2, dir=Out, idx=0, ofs=0
Control: name="Rear Mic Boost Volume", index=0, device=0
ControlAmp: chs=3, dir=In, idx=0, ofs=0
Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
Amp-In vals: [0x00 0x00]
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x00 0x00]
Pincap 0x00003736: IN OUT Detect Trigger
Vref caps: HIZ 50 GRD 80 100
Pin Default 0x01a19030: [Jack] Mic at Ext Rear
Conn = 1/8, Color = Pink
DefAssociation = 0x3, Sequence = 0x0
Pin-ctls: 0x21: IN VREF_50
Unsolicited: tag=03, enabled=1
Power states: D0 D1 D2 D3 EPSS
Power: setting=D0, actual=D0
Connection: 5
0x0c* 0x0d 0x0e 0x0f 0x26
Node 0x19 [Pin Complex] wcaps 0x40058f: Stereo Amp-In Amp-Out
Control: name="Front Mic Boost Volume", index=0, device=0
ControlAmp: chs=3, dir=In, idx=0, ofs=0
Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
Amp-In vals: [0x00 0x00]
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x80 0x80]
Pincap 0x0000373e: IN OUT HP Detect Trigger
Vref caps: HIZ 50 GRD 80 100
Pin Default 0x02a19040: [Jack] Mic at Ext Front
Conn = 1/8, Color = Pink
DefAssociation = 0x4, Sequence = 0x0
Pin-ctls: 0x24: IN VREF_80
Unsolicited: tag=02, enabled=1
Power states: D0 D1 D2 D3 EPSS
Power: setting=D0, actual=D0
Connection: 5
0x0c* 0x0d 0x0e 0x0f 0x26
Node 0x1a [Pin Complex] wcaps 0x40058f: Stereo Amp-In Amp-Out
Control: name="Surround Playback Switch", index=0, device=0
ControlAmp: chs=3, dir=Out, idx=0, ofs=0
Control: name="Line Boost Volume", index=0, device=0
ControlAmp: chs=3, dir=In, idx=0, ofs=0
Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
Amp-In vals: [0x00 0x00]
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x00 0x00]
Pincap 0x00003736: IN OUT Detect Trigger
Vref caps: HIZ 50 GRD 80 100
Pin Default 0x0181303f: [Jack] Line In at Ext Rear
Conn = 1/8, Color = Blue
DefAssociation = 0x3, Sequence = 0xf
Pin-ctls: 0x20: IN VREF_HIZ
Unsolicited: tag=04, enabled=1
Power states: D0 D1 D2 D3 EPSS
Power: setting=D0, actual=D0
Connection: 5
0x0c* 0x0d 0x0e 0x0f 0x26
Node 0x1b [Pin Complex] wcaps 0x40058f: Stereo Amp-In Amp-Out
Control: name="Headphone Playback Switch", index=0, device=0
ControlAmp: chs=3, dir=Out, idx=0, ofs=0
Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
Amp-In vals: [0x00 0x00]
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x00 0x00]
Pincap 0x0001373e: IN OUT HP EAPD Detect Trigger
Vref caps: HIZ 50 GRD 80 100
EAPD 0x2: EAPD
Pin Default 0x02214020: [Jack] HP Out at Ext Front
Conn = 1/8, Color = Green
DefAssociation = 0x2, Sequence = 0x0
Pin-ctls: 0xc0: OUT HP VREF_HIZ
Unsolicited: tag=01, enabled=1
Power states: D0 D1 D2 D3 EPSS
Power: setting=D0, actual=D0
Connection: 5
0x0c 0x0d 0x0e 0x0f* 0x26
Node 0x1c [Pin Complex] wcaps 0x400481: Stereo
Pincap 0x00000024: IN Detect
Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
Conn = 1/8, Color = Black
DefAssociation = 0xf, Sequence = 0x0
Misc = NO_PRESENCE
Pin-ctls: 0x20: IN
Unsolicited: tag=00, enabled=0
Power states: D0 D1 D2 D3 EPSS
Power: setting=D0, actual=D0
Node 0x1d [Pin Complex] wcaps 0x400400: Mono
Pincap 0x00000020: IN
Pin Default 0x4025c641: [N/A] HP Out at Ext N/A
Conn = Optical, Color = UNKNOWN
DefAssociation = 0x4, Sequence = 0x1
Pin-ctls: 0x20: IN
Power states: D0 D1 D2 D3 EPSS
Power: setting=D0, actual=D0
Node 0x1e [Pin Complex] wcaps 0x400781: Stereo Digital
Pincap 0x00000010: OUT
Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
Conn = 1/8, Color = Black
DefAssociation = 0xf, Sequence = 0x0
Misc = NO_PRESENCE
Pin-ctls: 0x40: OUT
Unsolicited: tag=00, enabled=0
Power states: D0 D1 D2 D3 EPSS
Power: setting=D0, actual=D0
Connection: 1
0x06
Node 0x1f [Pin Complex] wcaps 0x400681: Stereo Digital
Pincap 0x00000020: IN
Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
Conn = 1/8, Color = Black
DefAssociation = 0xf, Sequence = 0x0
Misc = NO_PRESENCE
Pin-ctls: 0x20: IN
Unsolicited: tag=00, enabled=0
Power states: D0 D1 D2 D3 EPSS
Power: setting=D0, actual=D0
Node 0x20 [Vendor Defined Widget] wcaps 0xf00040: Mono
Processing caps: benign=0, ncoeff=24
Node 0x21 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x22 [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-In vals: [0x80 0x80] [0x00 0x00] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80]
Connection: 12
0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x14 0x15 0x16 0x17 0x0b 0x12
Node 0x23 [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-In vals: [0x80 0x80] [0x00 0x00] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80]
Connection: 11
0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x14 0x15 0x16 0x17 0x0b
Node 0x24 [Vendor Defined Widget] wcaps 0xf00000: Mono
Node 0x25 [Audio Output] wcaps 0x41d: Stereo Amp-Out
Amp-Out caps: ofs=0x40, nsteps=0x40, stepsize=0x03, mute=0
Amp-Out vals: [0x40 0x40]
Converter: stream=0, channel=0
PCM:
rates [0x560]: 44100 48000 96000 192000
bits [0xe]: 16 20 24
formats [0x1]: PCM
Power states: D0 D1 D2 D3 EPSS
Power: setting=D0, actual=D0
Node 0x26 [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-In vals: [0x00 0x00] [0x80 0x80]
Connection: 2
0x25 0x0b
Codec0 is my graphics card which I don't use for audio. It appears it does support 24 bit audio but not 32. If that's the case, I don't see why it wouldn't honor my setting.
Last edited by mjd119 (2020-06-27 20:44:04)
Offline
For these values to be accurate you have to be playing something, do you know that your card actually supports 24le ? pulse will only honor this for cards that actually support what you are specifying.
If you want to know what your card supports, cease all playback (and since you seemingly disabled suspension, stop pulseaudio), compile
/* * hw_params.c - print hardware capabilities * * compile with: gcc -o hw_params hw_params.c -lasound */ #include <stdio.h> #include <alsa/asoundlib.h> #define ARRAY_SIZE(a) (sizeof(a) / sizeof *(a)) static const snd_pcm_access_t accesses[] = { SND_PCM_ACCESS_MMAP_INTERLEAVED, SND_PCM_ACCESS_MMAP_NONINTERLEAVED, SND_PCM_ACCESS_MMAP_COMPLEX, SND_PCM_ACCESS_RW_INTERLEAVED, SND_PCM_ACCESS_RW_NONINTERLEAVED, }; static const snd_pcm_format_t formats[] = { SND_PCM_FORMAT_S8, SND_PCM_FORMAT_U8, SND_PCM_FORMAT_S16_LE, SND_PCM_FORMAT_S16_BE, SND_PCM_FORMAT_U16_LE, SND_PCM_FORMAT_U16_BE, SND_PCM_FORMAT_S24_LE, SND_PCM_FORMAT_S24_BE, SND_PCM_FORMAT_U24_LE, SND_PCM_FORMAT_U24_BE, SND_PCM_FORMAT_S32_LE, SND_PCM_FORMAT_S32_BE, SND_PCM_FORMAT_U32_LE, SND_PCM_FORMAT_U32_BE, SND_PCM_FORMAT_FLOAT_LE, SND_PCM_FORMAT_FLOAT_BE, SND_PCM_FORMAT_FLOAT64_LE, SND_PCM_FORMAT_FLOAT64_BE, SND_PCM_FORMAT_IEC958_SUBFRAME_LE, SND_PCM_FORMAT_IEC958_SUBFRAME_BE, SND_PCM_FORMAT_MU_LAW, SND_PCM_FORMAT_A_LAW, SND_PCM_FORMAT_IMA_ADPCM, SND_PCM_FORMAT_MPEG, SND_PCM_FORMAT_GSM, SND_PCM_FORMAT_SPECIAL, SND_PCM_FORMAT_S24_3LE, SND_PCM_FORMAT_S24_3BE, SND_PCM_FORMAT_U24_3LE, SND_PCM_FORMAT_U24_3BE, SND_PCM_FORMAT_S20_3LE, SND_PCM_FORMAT_S20_3BE, SND_PCM_FORMAT_U20_3LE, SND_PCM_FORMAT_U20_3BE, SND_PCM_FORMAT_S18_3LE, SND_PCM_FORMAT_S18_3BE, SND_PCM_FORMAT_U18_3LE, SND_PCM_FORMAT_U18_3BE, }; static const unsigned int rates[] = { 5512, 8000, 11025, 16000, 22050, 32000, 44100, 48000, 64000, 88200, 96000, 176400, 192000, }; int main(int argc, char *argv[]) { const char *device_name = "hw"; snd_pcm_t *pcm; snd_pcm_hw_params_t *hw_params; unsigned int i; unsigned int min, max; int any_rate; int err; if (argc > 1) device_name = argv[1]; err = snd_pcm_open(&pcm, device_name, SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK); if (err < 0) { fprintf(stderr, "cannot open device '%s': %s\n", device_name, snd_strerror(err)); return 1; } snd_pcm_hw_params_alloca(&hw_params); err = snd_pcm_hw_params_any(pcm, hw_params); if (err < 0) { fprintf(stderr, "cannot get hardware parameters: %s\n", snd_strerror(err)); snd_pcm_close(pcm); return 1; } printf("Device: %s (type: %s)\n", device_name, snd_pcm_type_name(snd_pcm_type(pcm))); printf("Access types:"); for (i = 0; i < ARRAY_SIZE(accesses); ++i) { if (!snd_pcm_hw_params_test_access(pcm, hw_params, accesses[i])) printf(" %s", snd_pcm_access_name(accesses[i])); } putchar('\n'); printf("Formats:"); for (i = 0; i < ARRAY_SIZE(formats); ++i) { if (!snd_pcm_hw_params_test_format(pcm, hw_params, formats[i])) printf(" %s", snd_pcm_format_name(formats[i])); } putchar('\n'); err = snd_pcm_hw_params_get_channels_min(hw_params, &min); if (err < 0) { fprintf(stderr, "cannot get minimum channels count: %s\n", snd_strerror(err)); snd_pcm_close(pcm); return 1; } err = snd_pcm_hw_params_get_channels_max(hw_params, &max); if (err < 0) { fprintf(stderr, "cannot get maximum channels count: %s\n", snd_strerror(err)); snd_pcm_close(pcm); return 1; } printf("Channels:"); for (i = min; i <= max; ++i) { if (!snd_pcm_hw_params_test_channels(pcm, hw_params, i)) printf(" %u", i); } putchar('\n'); err = snd_pcm_hw_params_get_rate_min(hw_params, &min, NULL); if (err < 0) { fprintf(stderr, "cannot get minimum rate: %s\n", snd_strerror(err)); snd_pcm_close(pcm); return 1; } err = snd_pcm_hw_params_get_rate_max(hw_params, &max, NULL); if (err < 0) { fprintf(stderr, "cannot get maximum rate: %s\n", snd_strerror(err)); snd_pcm_close(pcm); return 1; } printf("Sample rates:"); if (min == max) printf(" %u", min); else if (!snd_pcm_hw_params_test_rate(pcm, hw_params, min + 1, 0)) printf(" %u-%u", min, max); else { any_rate = 0; for (i = 0; i < ARRAY_SIZE(rates); ++i) { if (!snd_pcm_hw_params_test_rate(pcm, hw_params, rates[i], 0)) { any_rate = 1; printf(" %u", rates[i]); } } if (!any_rate) printf(" %u-%u", min, max); } putchar('\n'); err = snd_pcm_hw_params_get_period_time_min(hw_params, &min, NULL); if (err < 0) { fprintf(stderr, "cannot get minimum period time: %s\n", snd_strerror(err)); snd_pcm_close(pcm); return 1; } err = snd_pcm_hw_params_get_period_time_max(hw_params, &max, NULL); if (err < 0) { fprintf(stderr, "cannot get maximum period time: %s\n", snd_strerror(err)); snd_pcm_close(pcm); return 1; } printf("Interrupt interval: %u-%u us\n", min, max); err = snd_pcm_hw_params_get_buffer_time_min(hw_params, &min, NULL); if (err < 0) { fprintf(stderr, "cannot get minimum buffer time: %s\n", snd_strerror(err)); snd_pcm_close(pcm); return 1; } err = snd_pcm_hw_params_get_buffer_time_max(hw_params, &max, NULL); if (err < 0) { fprintf(stderr, "cannot get maximum buffer time: %s\n", snd_strerror(err)); snd_pcm_close(pcm); return 1; } printf("Buffer size: %u-%u us\n", min, max); snd_pcm_close(pcm); return 0; }
this piece of code, run
./hw_params hw:1
post/check the output. I still think you are chasing a red herring here with an issue that doesn't seem software related, and you do many misguided changes in an attempt to resolve them. I still think the best "test" you can do here is stop pulseaudio, configure MPD to directly access hw:1 and check if you can still reproduce the high CPU crackling issue. If you can you can knock yourself out however you want it's unlikely you'll be able to fix this with pulseaudio configuration.
I compiled and ran that code with the hw:1 argument and got:
Device: hw:1 (type: HW)
Access types: MMAP_INTERLEAVED RW_INTERLEAVED
Formats: S16_LE S32_LE
Channels: 2
Sample rates: 44100 48000 96000 192000
Interrupt interval: 83-11888617 us
Buffer size: 166-23777234 us
That seems contradictory to the output I got from
most /proc/asound/card1/codec*
(see above).
Offline
One of them is a piece of information about what the codec should support and the other is actual evidence as to what the hardware ends up responding to when asked. Something is definitely weird here in regards to how your card is initialized. IIRC you did mention Windows in your other thread, if that is setup as a dual boot, have you ensured that fastboot is disabled ? If you've done that one thing you can try if windows or your BIOS/UEFI (it has been a while since we last talked about this, which motherboard brand is this?) sets up your card in a weird state is running
sudo alsactl init
that should enforce the card to be initialized according to the codecs specification rather than what's reported by the firmware.
Do you currently have any logical adjustments with regards to snd_hda_intel in modprobe.d or so? What's your output for
sudo journalctl -k | grep -E 'hda|snd|codec'
Offline
One of them is a piece of information about what the codec should support and the other is actual evidence as to what the hardware ends up responding to when asked. Something is definitely weird here in regards to how your card is initialized. IIRC you did mention Windows in your other thread, if that is setup as a dual boot, have you ensured that fastboot is disabled ? If you've done that one thing you can try if windows or your BIOS/UEFI (it has been a while since we last talked about this, which motherboard brand is this?) sets up your card in a weird state is running
sudo alsactl init
that should enforce the card to be initialized according to the codecs specification rather than what's reported by the firmware.
Do you currently have any logical adjustments with regards to snd_hda_intel in modprobe.d or so? What's your output for
sudo journalctl -k | grep -E 'hda|snd|codec'
My output for
sudo journalctl -k | grep -E 'hda|snd|codec
is:
Jun 30 10:31:40 Arch kernel: snd_hda_intel 0000:09:00.1: Handle vga_switcheroo audio client
Jun 30 10:31:40 Arch kernel: snd_hda_intel 0000:0b:00.4: enabling device (0000 -> 0002)
Jun 30 10:31:40 Arch kernel: snd_hda_codec_realtek hdaudioC1D0: autoconfig for ALC887-VD: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:line
Jun 30 10:31:40 Arch kernel: snd_hda_codec_realtek hdaudioC1D0: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
Jun 30 10:31:40 Arch kernel: snd_hda_codec_realtek hdaudioC1D0: hp_outs=1 (0x1b/0x0/0x0/0x0/0x0)
Jun 30 10:31:40 Arch kernel: snd_hda_codec_realtek hdaudioC1D0: mono: mono_out=0x0
Jun 30 10:31:40 Arch kernel: snd_hda_codec_realtek hdaudioC1D0: inputs:
Jun 30 10:31:40 Arch kernel: snd_hda_codec_realtek hdaudioC1D0: Front Mic=0x19
Jun 30 10:31:40 Arch kernel: snd_hda_codec_realtek hdaudioC1D0: Rear Mic=0x18
Jun 30 10:31:40 Arch kernel: snd_hda_codec_realtek hdaudioC1D0: Line=0x1a
Jun 30 10:31:41 Arch kernel: snd_hda_intel 0000:09:00.1: bound 0000:09:00.0 (ops amdgpu_dm_audio_component_bind_ops [amdgpu])
Jun 30 13:30:43 Arch kernel: snd_hda_intel 0000:09:00.1: IRQ timing workaround is activated for card #0. Suggest a bigger bdl_pos_adj.
Fast boot is turned off or on within Windows correct? At first I thought of "secure boot" but I know that's BIOS related. I think I set "fast boot" off when I first installed Ubuntu (no longer on my system) but I'll double check. I currently dual boot Arch with Windows 10 using Grub. Both boot with UEFI.
EDIT: I am dual booting with Windows 10 so I followed the guide from the link in the arch wiki section you linked. I used the first option with the control panel but I didn't see the setting even listed. I'll try the option when you use a bat file to disable fast startup just to be sure.
EDIT2: I ran the bat file to disable fast startup. I also disabled hibernation by running a command in command prompt from this guide: https://www.pugetsystems.com/labs/suppo … ation-793/ since the option wasn't available in power options in control panel to be sure.
Last edited by mjd119 (2020-06-30 23:18:09)
Offline