You are not logged in.
Pages: 1
Hi. I want to know if i can know the bits and khz from the sound playing with Alsa?
This is fine to know it?
cat /proc/asound/card0/pcm0p/sub0/hw_paramsBut, Alsa make resampling? i just want that what im playing goes to the soundcard without any modification.
For example i believe that with pulseaudio you can resample, etc. That is posible with Alsa?
I mean if the music is 24bit and 192khz exactly like that is how the operative system is sending. For example i have this with the cat hw_params
access: RW_INTERLEAVED
format: S32_LE
subformat: STD
channels: 2
rate: 96000 (96000/1)
period_size: 960
buffer_size: 19200this is 24bit??? and 96khz?
Im asking this because in some operative system when i want "good audio quality" i have to make some changes in pulse audio daemon file. But, if i just have ALSA, i need to do something?
Last edited by 9acca9 (2023-01-27 21:53:24)
Offline
ALSA resamples to 48KHz by default.
I use this ~/.asoundrc to stop resampling:
pcm.Digital {
type hw
card A20
}
ctl.!default {
type hw
card A20
}
pcm.!default {
type plug
slave {
pcm "Digital"
rate "unchanged"
}
}That example is for a(n asynchronous) USB-attached audiolab M-DAC+ that is identified as "A20" in /proc/asound/cards.
EDIT: sorry, I didn't read the question properly. I'm a bit distracted atm. I wouldn't trust software resampling to improve the sound in any way, although there are many guides that claim otherwise.
Last edited by Head_on_a_Stick (2023-01-27 22:10:57)
Jin, Jîyan, Azadî
Offline
Hi.
I have this in asound.conf:
pcm.!default {
type hw card 0
}
ctl.!default {
type hw card 0
}so i need to change to this?
pcm.Digital {
type hw card 0
}
ctl.!default {
type hw card 0
}
pcm.!default {
type hw
slave {
pcm "Digital"
rate "unchanged"
}
}And so, even if im seen that in cat /proc/asound/card0/pcm0p/sub0/hw_params im not really getting the original audio?
Thanks!
Last edited by 9acca9 (2023-01-27 22:47:11)
Offline
That "card 0" identifier might not be reliable. Use the name given in the square brackets in /proc/asound/cards. Not sure about that hw_params file though, sorry. There are other members here with a better grasp of audio stuff than me. I only know enough to get my fancy DAC working.
Last edited by Head_on_a_Stick (2023-01-27 23:06:24)
Jin, Jîyan, Azadî
Offline
mmm, yep card 0 is not working with your config, and if i change to what i have here:
cat /proc/asound/cards
0 [IQaudIODAC ]: IQaudIODAC - IQaudIODAC
IQaudIODAC"card IQaudIODAC" or just "IQaudIODAC"... also dont work.
mmmmm
Offline
I think it should be "card IQaudIODAC". Does the card accept a PCM (digital) input? The "DAC" in the name suggests so.
Jin, Jîyan, Azadî
Offline
Hi. Now is working with your config. But, i get almost the same in hw_params that at the beginning. (almost the same, and the same...)
With a song of 24bit 192Khz i get this:
cat /proc/asound/IQaudIODAC/pcm0p/sub0/hw_params
access: MMAP_INTERLEAVED
format: S24_LE
subformat: STD
channels: 2
rate: 192000 (192000/1)
period_size: 1920
buffer_size: 38400With a song with 16bit 44Khz i get this:
cat /proc/asound/IQaudIODAC/pcm0p/sub0/hw_params
access: RW_INTERLEAVED
format: S16_LE
subformat: STD
channels: 2
rate: 44100 (44100/1)
period_size: 441
buffer_size: 8820The difference with the first of my post is this, with 24 bit 192khz:
access: MMAP_INTERLEAVEDBut, with the 16bit 44khz, that difference is not consistent, i get:
access: RW_INTERLEAVEDmmmmm
EDIT: " Plugin: hw. This plugin communicates directly with the ALSA kernel driver. It is a raw communication without any conversions. The emulation of mmap access can be optionally enabled, but expect worse latency in the case." mmmmmmm
Last edited by 9acca9 (2023-01-28 01:38:23)
Offline
Pages: 1