I got a solution for my dac, but what is best sound?
#16
The output (my post above) is from cat /proc/asound/card2/stream0 | 1 | 2 | 3

I think.

cat /proc/asound/card2/stream1 (device 1):

Playback:
Status: Running
Interface = 2
Altset = 1
Packet Size = 33
Momentary freq = 48000 Hz (0x6.0000)
Feedback Format = 16.16
Interface 2
Altset 1
Format: S16_LE
Channels: 2
Endpoint: 6 OUT (ASYNC)
Rates: 44100, 48000, 88200, 96000, 176400, 192000
Data packet interval: 125 us
Interface 2
Altset 2
Format: S24_3LE
Channels: 2
Endpoint: 6 OUT (ASYNC)
Rates: 44100, 48000, 88200, 96000, 176400, 192000
Data packet interval: 125 us

Capture:
Status: Stop
Interface 5
Altset 1
Format: S16_LE
Channels: 2
Endpoint: 8 IN (ASYNC)
Rates: 44100, 48000, 88200, 96000, 176400, 192000
Data packet interval: 125 us
Interface 5
Altset 2
Format: S24_3LE
Channels: 2
Endpoint: 8 IN (ASYNC)
Rates: 44100, 48000, 88200, 96000, 176400, 192000
Data packet interval: 125 us

Is the enumeration in that file, ore were do it comes from?

I can see the output from the mplayer command line from alsa, an it is in my first post here. If alsa ore mplayer don't hide any thing, the DAC actually can take higher then 48 000 on its USB connection. But my bee it is a meeningsless hack for Kodi, the one I did with mplayer and the alsa configuration.
Reply
#17
use speaker-test -D plughw:2,1 -c 2 -r 96000

to test
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#18
(2015-06-09, 21:37)fritsch Wrote: use speaker-test -D plughw:2,1 -c 2 -r 96000

to test

Only noice, as with aplayer. Noice when I use 48000 also

No noice if I use: speaker-test -D plughw:2,1 -c2 -r 48000 -twav
(got the test out right)

... and if I use use: speaker-test -D plughw:2,1 -c 2 -r 96000 -twav

The report is:

The sampling frequency is not suitable (48000)

So you right about the card. My bee mplayer do some thing that do not show up by "-v"

My bee should have mentioned also that it is an asynconius DAC.
Reply
#19
Quote:The sampling frequency is not suitable (48000)

^^ no idea - no idea, ask on ALSA ML
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#20
Mplayer do this:

Building audio filter chain for 96000Hz/2ch/s32le -> 0Hz/0ch/??...
[libaf] Adding filter dummy
[dummy] Was reinitialized: 96000Hz/2ch/s32le
[dummy] Was reinitialized: 96000Hz/2ch/s32le
Trying preferred audio driver 'alsa', options 'device=hw=2.1'
alsa-init: requested format: 96000 Hz, 2 channels, 19
alsa-init: using ALSA 1.0.27.2
alsa-init: setup for 1/2 channel(s)
alsa-init: using device hw:2,1
alsa-init: opening device in blocking mode
alsa-init: device reopened in blocking mode
[AO_ALSA] Format s32le is not supported by hardware, trying default.
alsa-init: got buffersize=192000
alsa-init: got period size 3000
alsa: 96000 Hz/2 channels/4 bpf/192000 bytes buffer/Signed 16 bit Little Endian
AO: [alsa] 96000Hz 2ch s16le (2 bytes per sample)
AO: Description: ALSA-0.9.x-1.x audio output
AO: Author: Alex Beregszaszi, Zsolt Barat <[email protected]>
AO: Comment: under development
Building audio filter chain for 96000Hz/2ch/s32le -> 96000Hz/2ch/s16le...
[dummy] Was reinitialized: 96000Hz/2ch/s32le
[libaf] Adding filter format
[format] Changing sample format from little-endian 32-bit signed int to little-endian 16-bit signed int
[dummy] Was reinitialized: 96000Hz/2ch/s32le
[format] Changing sample format from little-endian 32-bit signed int to little-endian 16-bit signed int
..
Reply
#21
(2015-06-09, 22:06)fritsch Wrote:
Quote:The sampling frequency is not suitable (48000)

^^ no idea - no idea, ask on ALSA ML

48000 is what it should bee, so 96000 is blcoked.

So you right about the cards default, Fritsch.
Reply
#22
Degrades your 24 bit source to 16 bit (congratulation)... and most likely it uses resample under the hood

Edit: User has deleted the former post.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#23
No so good, my be better with digital direct then. I through out my old DVD player and use the coaxial for computer.

Don´t think I get any further with this. Looks like the card sound better know, on USB also. Burn in time.

So I thank you so much for your time and help Fritsch!
Reply
#24
I still think it's worth to check it via the ALSA ML, Kodi can play the 24 bit format, if you get the driver fixed.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#25
Ok, I will test again tomorrow, without my extra alsa plug, and then my bee I contact them. Late here.
Reply
#26
(2015-06-09, 22:07)Klasw Wrote: Mplayer do this:

Building audio filter chain for 96000Hz/2ch/s32le -> 96000Hz/2ch/s16le...

If you want mplayer to use exactly what your h/w can take you will often need to tell it explicitly.

mplayer -format s24le ....
Reply
#27
(2015-06-10, 01:10)AndyFurniss Wrote:
(2015-06-09, 22:07)Klasw Wrote: Mplayer do this:

Building audio filter chain for 96000Hz/2ch/s32le -> 96000Hz/2ch/s16le...

If you want mplayer to use exactly what your h/w can take you will often need to tell it explicitly.

mplayer -format s24le ....
Thanks AndyFurniss, do not know wy I did not test that before.

Some funny things happen obviously.

When I test:

mplayer -v -ao alsa:device=hw=2.1 -format s24le

I got:

AUDIO: 96000 Hz, 2 ch, s32le, 2834.0 kbit/46.13% (ratio: 354244->768000)
Selected audio codec: [ffflac] afm: ffmpeg (FFmpeg FLAC audio)
==========================================================================
Building audio filter chain for 96000Hz/2ch/s32le -> 0Hz/0ch/s24le...
[libaf] Adding filter dummy
[dummy] Was reinitialized: 96000Hz/2ch/s32le
[libaf] Adding filter format
[format] Changing sample format from little-endian 32-bit signed int to little-endian 24-bit signed int
[dummy] Was reinitialized: 96000Hz/2ch/s32le
[format] Changing sample format from little-endian 32-bit signed int to little-endian 24-bit signed int
Trying preferred audio driver 'alsa', options 'device=hw=2.1'
alsa-init: requested format: 96000 Hz, 2 channels, 11
alsa-init: using ALSA 1.0.27.2
alsa-init: setup for 1/2 channel(s)
alsa-init: using device hw:2,1
alsa-init: opening device in blocking mode
alsa-init: device reopened in blocking mode
alsa-init: got buffersize=288000
alsa-init: got period size 3000
alsa: 96000 Hz/2 channels/6 bpf/288000 bytes buffer/Signed 24 bit Little Endian in 3bytes
AO: [alsa] 96000Hz 2ch s24le (3 bytes per sample)
AO: Description: ALSA-0.9.x-1.x audio output
AO: Author: Alex Beregszaszi, Zsolt Barat <[email protected]>
AO: Comment: under development
Building audio filter chain for 96000Hz/2ch/s32le -> 96000Hz/2ch/s24le...
[dummy] Was reinitialized: 96000Hz/2ch/s32le
[format] Changing sample format from little-endian 32-bit signed int to little-endian 24-bit signed int
[dummy] Was reinitialized: 96000Hz/2ch/s32le
[format] Changing sample format from little-endian 32-bit signed int to little-endian 24-bit signed int
Video: no video
Freeing 0 unused video chunks.
Starting playback...
[libaf] Reallocating memory in module format, old len = 0, new len = 98313
Increasing filtered audio buffer size from 0 to 98304
Increasing filtered audio buffer size from 98304 to 134112
...

But if I test (the actual format off the file):

mplayer -v -ao alsa:device=hw=2.1 -format s32le

I got:

AUDIO: 96000 Hz, 2 ch, s32le, 2834.0 kbit/46.13% (ratio: 354244->768000)
Selected audio codec: [ffflac] afm: ffmpeg (FFmpeg FLAC audio)
==========================================================================
Building audio filter chain for 96000Hz/2ch/s32le -> 0Hz/0ch/s32le...
[libaf] Adding filter dummy
[dummy] Was reinitialized: 96000Hz/2ch/s32le
[dummy] Was reinitialized: 96000Hz/2ch/s32le
Trying preferred audio driver 'alsa', options 'device=hw=2.1'
alsa-init: requested format: 96000 Hz, 2 channels, 19
alsa-init: using ALSA 1.0.27.2
alsa-init: setup for 1/2 channel(s)
alsa-init: using device hw:2,1
alsa-init: opening device in blocking mode
alsa-init: device reopened in blocking mode
[AO_ALSA] Format s32le is not supported by hardware, trying default.
alsa-init: got buffersize=192000
alsa-init: got period size 3000
alsa: 96000 Hz/2 channels/4 bpf/192000 bytes buffer/Signed 16 bit Little Endian
AO: [alsa] 96000Hz 2ch s16le (2 bytes per sample)
AO: Description: ALSA-0.9.x-1.x audio output
AO: Author: Alex Beregszaszi, Zsolt Barat <[email protected]>
AO: Comment: under development
Building audio filter chain for 96000Hz/2ch/s32le -> 96000Hz/2ch/s16le...
[dummy] Was reinitialized: 96000Hz/2ch/s32le
[libaf] Adding filter format
[format] Changing sample format from little-endian 32-bit signed int to little-endian 16-bit signed int
[dummy] Was reinitialized: 96000Hz/2ch/s32le
[format] Changing sample format from little-endian 32-bit signed int to little-endian 16-bit signed int
Video: no video
Freeing 0 unused video chunks.
Starting playback...
[libaf] Reallocating memory in module format, old len = 0, new len = 65545
Increasing filtered audio buffer size from 0 to 65536
Increasing filtered audio buffer size from 65536 to 131072
..

I also tested to change in my .asoundrc to what was most stable for Kodi (the other sink falls out some times), and what it looks like that Kodi reads any way:

defaults.pcm.!card Audio
defaults.pcm.!device 1

Then I tested:

mplayer -v -format s24le

I got:

AUDIO: 96000 Hz, 2 ch, s32le, 2834.0 kbit/46.13% (ratio: 354244->768000)
Selected audio codec: [ffflac] afm: ffmpeg (FFmpeg FLAC audio)
==========================================================================
Building audio filter chain for 96000Hz/2ch/s32le -> 0Hz/0ch/s24le...
[libaf] Adding filter dummy
[dummy] Was reinitialized: 96000Hz/2ch/s32le
[libaf] Adding filter format
[format] Changing sample format from little-endian 32-bit signed int to little-endian 24-bit signed int
[dummy] Was reinitialized: 96000Hz/2ch/s32le
[format] Changing sample format from little-endian 32-bit signed int to little-endian 24-bit signed int
Trying preferred audio driver 'pulse', options '[none]'
AO: [pulse] Unsupported format, using default
AO: [pulse] Init failed: Connection refused
Failed to initialize audio driver 'pulse'
Trying preferred audio driver 'alsa', options '[none]'
alsa-init: requested format: 96000 Hz, 2 channels, 11
alsa-init: using ALSA 1.0.27.2
alsa-init: setup for 1/2 channel(s)
alsa-init: using device default
alsa-init: opening device in blocking mode
alsa-init: device reopened in blocking mode
alsa-init: got buffersize=98304
alsa-init: got period size 1024
alsa: 48000 Hz/2 channels/6 bpf/98304 bytes buffer/Signed 24 bit Little Endian in 3bytes
AO: [alsa] 48000Hz 2ch s24le (3 bytes per sample)
AO: Description: ALSA-0.9.x-1.x audio output
AO: Author: Alex Beregszaszi, Zsolt Barat <[email protected]>
AO: Comment: under development
Building audio filter chain for 96000Hz/2ch/s32le -> 48000Hz/2ch/s24le...
[dummy] Was reinitialized: 96000Hz/2ch/s32le
[format] Changing sample format from little-endian 32-bit signed int to little-endian 24-bit signed int
[libaf] Adding filter lavcresample
[libaf] Adding filter format
[format] Changing sample format from little-endian 32-bit signed int to little-endian 16-bit signed int
[dummy] Was reinitialized: 48000Hz/2ch/s16le
[format] Changing sample format from little-endian 16-bit signed int to little-endian 24-bit signed int
[format] Changing sample format from little-endian 32-bit signed int to little-endian 16-bit signed int
[dummy] Was reinitialized: 48000Hz/2ch/s16le
[format] Changing sample format from little-endian 16-bit signed int to little-endian 24-bit signed int
Video: no video
Freeing 0 unused video chunks.
Starting playback...
[libaf] Reallocating memory in module format, old len = 0, new len = 65545
[libaf] Reallocating memory in module lavcresample, old len = 0, new len = 32773
[libaf] Reallocating memory in module format, old len = 0, new len = 49097
Increasing filtered audio buffer size from 0 to 49092
[libaf] Reallocating memory in module format, old len = 49097, new len = 49157
Increasing filtered audio buffer size from 49092 to 98244
Increasing filtered audio buffer size from 98244 to 99828
...

Conclusions:

The card (the dac) take 24 bit up to 192 kHz.

But if its float, it resample down to 16 bit!

If I do not go to the raw sink (hw), it change to 48 kHz

Kodi use the default think from aplay -L, what ever I have in my .asoundrc

If its 48 kHz then it down-sample to 16-bit what ever I tell it to use (like s24le).

... and then back to 24 bit again!

Funny card ore funny alsa?

EDIT: In my opinion, Kodi should use the alsa configuration I set (in .asoundrc) , it do not do it now.
Reply
#28
So test 1 works

Test 2 fails because you told mplayer to output s32le to hw that soesn't take it and it fell back to s16le.

Test 3 - alsa - well I am just in trial and error mode when ever I need to do anything new with alsa. Some thoughts.

Is Audio the unique name for your dac - eg. do you see it if you

cat /proc/asound/card*/id

If yes then does this work better (mplayer test 3) in .asoundrc

pcm.!default {
type hw
card Audio
device 1
}

You could use card number instead - but that may change between boots.
Reply
#29
(2015-06-12, 00:56)AndyFurniss Wrote: So test 1 works

Test 2 fails because you told mplayer to output s32le to hw that soesn't take it and it fell back to s16le.

Test 3 - alsa - well I am just in trial and error mode when ever I need to do anything new with alsa. Some thoughts.

Is Audio the unique name for your dac - eg. do you see it if you

cat /proc/asound/card*/id

If yes then does this work better (mplayer test 3) in .asoundrc

pcm.!default {
type hw
card Audio
device 1
}

You could use card number instead - but that may change between boots.

I have tested card numbers, see my third post in this tree. I know how to change the order off cards (sudo nano /etc/modprobe.d/alsa-base.conf) and it was not good to have the usb as card one (who is in that third post off mine) s I put it at number two.

"Audio" is the sink I get from the command aplay -L . What I understand it is a plug that alsa automatic construct, when it recognize and find the sound card:

sysdefault:CARD=Audio
USB2.0 High-Speed True HD Audio, USB Audio #1
Default Audio Device
front:CARD=Audio,DEV=0
USB2.0 High-Speed True HD Audio, USB Audio
Front speakers
surround40:CARD=Audio,DEV=0
USB2.0 High-Speed True HD Audio, USB Audio
4.0 Surround output to Front and Rear speakers
surround41:CARD=Audio,DEV=0
USB2.0 High-Speed True HD Audio, USB Audio
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Audio,DEV=0
USB2.0 High-Speed True HD Audio, USB Audio
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Audio,DEV=0
USB2.0 High-Speed True HD Audio, USB Audio
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Audio,DEV=0
USB2.0 High-Speed True HD Audio, USB Audio
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Audio,DEV=0
USB2.0 High-Speed True HD Audio, USB Audio
IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=Audio,DEV=0
USB2.0 High-Speed True HD Audio, USB Audio
Direct sample mixing device
dmix:CARD=Audio,DEV=1
USB2.0 High-Speed True HD Audio, USB Audio #1
Direct sample mixing device
dmix:CARD=Audio,DEV=2
USB2.0 High-Speed True HD Audio, USB Audio #2
Direct sample mixing device
dmix:CARD=Audio,DEV=3
USB2.0 High-Speed True HD Audio, USB Audio #3
Direct sample mixing device
dsnoop:CARD=Audio,DEV=0
USB2.0 High-Speed True HD Audio, USB Audio
Direct sample snooping device
dsnoop:CARD=Audio,DEV=1
USB2.0 High-Speed True HD Audio, USB Audio #1
Direct sample snooping device
dsnoop:CARD=Audio,DEV=2
USB2.0 High-Speed True HD Audio, USB Audio #2
Direct sample snooping device
dsnoop:CARD=Audio,DEV=3
USB2.0 High-Speed True HD Audio, USB Audio #3
Direct sample snooping device
hw:CARD=Audio,DEV=0
USB2.0 High-Speed True HD Audio, USB Audio
Direct hardware device without any conversions
hw:CARD=Audio,DEV=1
USB2.0 High-Speed True HD Audio, USB Audio #1
Direct hardware device without any conversions
hw:CARD=Audio,DEV=2
USB2.0 High-Speed True HD Audio, USB Audio #2
Direct hardware device without any conversions
hw:CARD=Audio,DEV=3
USB2.0 High-Speed True HD Audio, USB Audio #3
Direct hardware device without any conversions
plughw:CARD=Audio,DEV=0
USB2.0 High-Speed True HD Audio, USB Audio
Hardware device with all software conversions
plughw:CARD=Audio,DEV=1
USB2.0 High-Speed True HD Audio, USB Audio #1
Hardware device with all software conversions
plughw:CARD=Audio,DEV=2
USB2.0 High-Speed True HD Audio, USB Audio #2
Hardware device with all software conversions
plughw:CARD=Audio,DEV=3
USB2.0 High-Speed True HD Audio, USB Audio #3
Hardware device with all software conversions

Your sink do not function in Kodi.

This function, though:

defaults.pcm.!card Audio
defaults.pcm.!device 1
defaults.pcm.type hw

and this also:

defaults.ctl.card 2
defaults.pcm.card 2
defaults.pcm.device 1
defaults.pcm.type hw

We should probably wait for the alsa bug to bee solved, as fritsch pointed out. Thanks any way for your response, AndyFurniss.
Reply

Logout Mark Read Team Forum Stats Members Help
I got a solution for my dac, but what is best sound?0