Linux Audio bit perfect with new audio engine
#46
Most likely he has overlooked the Expert Setting in Audio Output Settings ... which defaults to 48000.
Image
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#47
WIth speakertest I hear noise alternatively in left and right headphones and output goes like:

speaker-test -c2 -D plughw:1,0 -r 96000

speaker-test 1.0.28

Playback device is plughw:1,0
Stream parameters are 96000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Rate set to 96000Hz (requested 96000Hz)
Buffer size range from 24 to 131072
Period size range from 12 to 65536
Using max buffer size 131072
Periods = 4
was set period_size = 32768
was set buffer_size = 131072
0 - Front Left
1 - Front Right

and so on with different Time per periods.

I didnt understand the " INFO: CActiveAE::ApplySettings - limit samplerate for SPDIF to 48000" part
Reply
#48
Image

I made a black circle for you ^^
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#49
Yes, fritsch

You are right. That parameter in expert settings did the trick. I hope there's a valid reason for setting it to 48 by default Big Grin

Thanks
Reply
#50
Yes. Only ~ 10% Receivers can actually do more than 48 khz via spdif!

Edit: 10% of team kodi's AVRs that is ... when we introduced this setting we search arround and decided for a failsafe default - the audiophiles we thought, will set everything to expert right away and tune everything to the very best. Btw. if you choose resample "High Quality". I took extra care, that it needs 4 times the CPU load of Medium - you won't hear a difference, but the audiophile wanted it like this.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#51
As I mentioned above, 192 khz or 192 downsampled to 48 sound same to my ears. 44.1 seems quite enough,
BUT the most obtrusive thing in my old ION system is CPU fan when it increases RPM under load. So I'd rather avoid resampling at all if I can

Thanks again. Now correct audiophylic led is proudly lit on my DAC!
Reply
#52
I'm having exactly the same issue.

ALSA Analog
Result: sound outputs 48kHz 24bit independent of the source encoding
ALSA S/PDIF
Result: gives correct sample rate but is fixed at 24bit independent of the source encoding

Almost two years later and Kodi still has the same issue?!?

Did you find a workaround for this?
Reply
#53
(2016-12-26, 17:07)PedroSoares Wrote: I'm having exactly the same issue.

ALSA Analog
Result: sound outputs 48kHz 24bit independent of the source encoding
ALSA S/PDIF
Result: gives correct sample rate but is fixed at 24bit independent of the source encoding

Almost two years later and Kodi still has the same issue?!?

Did you find a workaround for this?

We did long ago but you still seem not to understand the topic.
Reply
#54
I installed Kodi in Volumio distro to make sure there is no kernel/OS issues in the way, as Volumio player gives bit perfect.

These are the sound parameters when music is playing from Kodi:
Code:
~$ cat /proc/asound/card5/pcm0p/sub0/hw_params

access: MMAP_INTERLEAVED
format: S16_LE
subformat: STD
channels: 2
rate: 48000 (48000/1)
period_size: 1024
buffer_size: 16384

and this is what I was expecting to have (and what I have in Volumio player for example):

Code:
~$ cat /proc/asound/card5/pcm0p/sub0/hw_params

access: RW_INTERLEAVED
format: S16_LE
subformat: STD
channels: 2
rate: 44100 (44100/1)
period_size: 5513
buffer_size: 22050

No matter what settings I do change on Kodi, I never get bit perfect playback. The output is always changed.
Reply
#55
No Debug Log no issue. Kodi's "Best Match" setting was designed to open the exact matching device.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#56
Thanks.

Can you please take a look?
http://pastebin.com/NykdpZqU

This doesn't look good:

23:06:58 634.340759 T:1944297472 NOTICE: Device 2
23:06:58 634.340820 T:1944297472 NOTICE: m_deviceName : @:CARD=II,DEV=0
23:06:58 634.340820 T:1944297472 NOTICE: m_displayName : Music Streamer II
23:06:58 634.340881 T:1944297472 NOTICE: m_displayNameExtra: Analog
23:06:58 634.340881 T:1944297472 NOTICE: m_deviceType : AE_DEVTYPE_PCM
23:06:58 634.340942 T:1944297472 NOTICE: m_channels : FL,FR
23:06:58 634.340942 T:1944297472 NOTICE: m_sampleRates : 48000
23:06:58 634.341003 T:1944297472 NOTICE: m_dataFormats : AE_FMT_S16NE,AE_FMT_S16LE
23:06:58 634.341064 T:1944297472 NOTICE: Device 3
23:06:58 634.341125 T:1944297472 NOTICE: m_deviceName : iec958:CARD=II,DEV=0
23:06:58 634.341125 T:1944297472 NOTICE: m_displayName : Music Streamer II
23:06:58 634.341187 T:1944297472 NOTICE: m_displayNameExtra: S/PDIF
23:06:58 634.341187 T:1944297472 NOTICE: m_deviceType : AE_DEVTYPE_IEC958
23:06:58 634.341248 T:1944297472 NOTICE: m_channels : FL,FR
23:06:58 634.341248 T:1944297472 NOTICE: m_sampleRates : 32000,44100,48000,88200,96000
23:06:58 634.341309 T:1944297472 NOTICE: m_dataFormats : AE_FMT_AC3,AE_FMT_DTS,AE_FMT_S24NE3,AE_FMT_S16NE,AE_FMT_S16LE

Is there anything I should change on alsa config?
Reply
#57
Quote:23:06:58 634.340759 T:1944297472 NOTICE: Device 2
23:06:58 634.340820 T:1944297472 NOTICE: m_deviceName : @:CARD=II,DEV=0
23:06:58 634.340820 T:1944297472 NOTICE: m_displayName : Music Streamer II
23:06:58 634.340881 T:1944297472 NOTICE: m_displayNameExtra: Analog
23:06:58 634.340881 T:1944297472 NOTICE: m_deviceType : AE_DEVTYPE_PCM
23:06:58 634.340942 T:1944297472 NOTICE: m_channels : FL,FR
23:06:58 634.340942 T:1944297472 NOTICE: m_sampleRates : 48000
23:06:58 634.341003 T:1944297472 NOTICE: m_dataFormats : AE_FMT_S16NE,AE_FMT_S16LE

Please post: aplay -l and aplay -L

then try: speaker-test -D plughw:x,y -r 44100 -c 2 and see if the card supports 44.1 khz via the analog out

If you have dmix enabled, kodi will use the dmix - so make sure that one is not enabled.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#58
Music Streamer II has no spdif output, it is a DAC. Looks like ALSA does not identify it properly. Should be working if you select device 3.
Kodi always selects best output regarding number of bits, in your case 24. Transferring a 16 bit source via 24 is lossless. Means it is bit perfect.
Reply
#59
I understand that selecting SPDIF output doesn't make sense, but it was the only way I got to make the sample rate match.
And playing it on 24 bits (or something else Kodi does), really ruins the music. Its completly different on how it sounds, and I'm comparing Volumio player versus Kodi, on the same environment.
I even used my 9 year old kid to blind test both playblacks on the same musics and Volumio always won (format: S16_LE)

I will check tonight aplay results, dmix, and everything else and let you know. Thanks a lot for the help.
Reply
#60
I think this is dmix in the way.
Really can't understand why Kodi always tries to use dmix.
Is there a way to disable?

I edited /etc/asound.conf with:
pcm.!default {
type plug
slave.pcm hw
}
but output stays at 48000

speaker-test -D plughw:5,0 -r 44100 -c 2
plays everything correctly at 44100

aplay -L
http://pastebin.com/hpq04RFr

aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 5: II [Music Streamer II], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
Reply

Logout Mark Read Team Forum Stats Members Help
Audio bit perfect with new audio engine0