I got a solution for my dac, but what is best sound?
#1
I bought a new USB external sound card; Taga Harmony DA-300.

SPDIF IN (coaxial and optical):
24bit 192kHz (Coaxial, Optical)
TI Burr-Brown Audio PCM2704 chip

USB IN:
16bit 48kHz (USB) CirrusLogic CS8416 chip
---

MY ALSA CONFIG

At first change in: /etc/modprobe.d/alsa-base.conf

options snd-usb-audio index=-2

..to:

options snd-usb-audio index=0

Ad some simple basic settings in .asoundrc. Only this:

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

( default:CARD=Audio from aplay -L)

Restart computer. Importent to get digital signal to function, as a plug in do not connect spdif.

Done, it should know come up as default in Kodi, and you can set its spdif as pass though outpup there also. pcm (default music signal) and EDIT dts do NOT function and not ac3.

I also installed phonon-backend-vlc, and move up default in multimedia gui in KDE. Do not know if that made any difference, but If you use the computer as a desktop workstation, it make some difference in sound quality with alsa.

SOME EXTRA THOUGHT FOR DISCUSSION

When I was mixing with this to find a solution ,the funny thing is that when I had an other configuration , I got better output from, mplayer, (but Kodi did not function then).
This was my configuration, then (in .asoundrc):

cm.!default {
type plug
slave {
pcm "hw:0,1"
}
}


ctl.!default {
type hw
card 0
}

So when I played by command line:

mplayer /media/multimedia/music/Pink\ Floyd\ -\ The\ Dark\ Side\ Of\ The\ Moon\ \(2011\)\ \{FLAC\}\ \[Blu-Ray\ 24-96\ Stereo\]\04.Time.flac


AUDIO: 96000 Hz, 2 ch, s32le, 2834.0 kbit/46.13% (ratio: 354244->768000)
Selected audio codec: [ffflac] afm: ffmpeg (FFmpeg FLAC audio)


AO: [alsa] 96000Hz 2ch s32le (4 bytes per sample)

Now I only got this:

AO: [alsa] 48000Hz 2ch s32le (4 bytes per sample)

I doubt I can hear any difference, but its funny the usb take the higher sampling rate. If I try to put it out by raw format (by aplay) it did ot function, only got noise.


Some data about the sound card:
---
From cat /proc/asound/card0/stream1
---
Playback:
Status: Stop
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

---
From cat /proc/asound/card0/stream2
---
Playback:
Status: Running
Interface = 2
Altset = 3
Packet Size = 33
Momentary freq = 48000 Hz (0x6.0000)
Feedback Format = 16.16
Interface 2
Altset 3
Format: S16_LE
Channels: 2
Endpoint: 6 OUT (ASYNC)
Rates: 44100, 48000, 88200, 96000, 176400, 192000
Data packet interval: 125 us
---

I got a solution, but any comment is interesting on this, I think. What is best sound, 96000Hz Little Endian ore 48000Hz 2ch s32le?
Wy can not Kodis paplayer play at 96000Hz Little Endian, but mplayer do?
Reply
#2
Use your ears! If you cannot say with your ears - everything else is not worth it at all. Here something to read: http://xiph.org/~xiphmont/demo/neil-young.html

And no help without a full Debug Log
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#3
(2015-06-08, 10:14)fritsch Wrote: Use your ears! If you cannot say with your ears - everything else is not worth it at all. Here something to read: http://xiph.org/~xiphmont/demo/neil-young.html

And no help without a full Debug Log

I think my own alsa think sounded a bit better, deeper base and a bit more clarity in the upper frequencies. I got a good stereo, with Magnat stereo amplifier and Heco Argon loudspeakers (they old, but still good), but it can bee the plasebo effect also, have not done a blind test yet.

I think its a bug in Kodi Audioengine, I have tested to change to only play audio also by dvdplayeroth mplayer and vlc plays by my think.

A bit confusing is that I think I got the version 2 off the dac. The instruction book says DA-300 v2. That version actually have 192 kHz / 24bit on Usb connection also.

What I try to learn in that perspective, is how alsa functions. How can I see what the sink actually take and put out, and is al accurate information by "mplayer -v" presented ? My bee the think is converting to 48kHz, in the background?

A bit technical and nerdy questions, I know, but thats me! Rofl
Reply
#4
Post you Debug Log ... nobody can help you without it ...
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#5
Kodi log:

http://pastebin.com/aMC5a9Nx

Alsa info log:

http://pastebin.com/rLeML2j8

with this configuration:

pcm.!default {
type plug
slave {
pcm "hw:0,1"
}
}
ctl.!default {
type hw
card 0
device 1
}

I have know also updated to Kodi 15.0 beta, same problem. And know thee is no paplayer, at least not at the command line. So I can not test that again.

-----

And if its interesting, the output from mplayer:

Load subtitles in /media/multimedia/musik/Pink Floyd - The Dark Side Of The Moon (2011) {FLAC} [Blu-Ray 24-96 Stereo]/
get_path('sub/') -> '/home/klas/.mplayer/sub/'
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
dec_audio: Allocating 1536000 + 131072 = 1667072 bytes for output buffer.
FFmpeg's libavcodec audio codec
libavcodec version 54.35.0 (external)
Configuration: --arch=i386 --enable-pthreads --enable-runtime-cpudetect --extra-version='6:9.18-0ubuntu0.14.04.1' --libdir=/usr/lib/i386-linux-gnu --prefix=/usr --enable-bzlib --enable-libdc1394 --enable-libfreetype --enable-frei0r --enable-gnutls --enable-libgsm --enable-libmp3lame --enable-librtmp --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-vaapi --enable-vdpau --enable-libvorbis --enable-libvpx --enable-zlib --enable-gpl --enable-swscale --enable-libcdio --enable-x11grab --enable-libx264 --enable-libxvid --shlibdir=/usr/lib/i386-linux-gnu/i686/cmov --cpu=i686 --enable-shared --disable-static --enable-libopencore-amrnb --enable-version3 --enable-libopencore-amrwb --enable-version3 --enable-libvo-aacenc --enable-version3 --enable-libvo-amrwbenc --enable-version3
INFO: libavcodec "flac" init OK!
[NULL @ 0xb6a2cf00]Junk frame till offset 112845
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/??...
[libaf] Adding filter dummy
[dummy] Was reinitialized: 96000Hz/2ch/s32le
[dummy] Was reinitialized: 96000Hz/2ch/s32le
Trying preferred audio driver 'pulse', options '[none]'
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, 19
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=384000
alsa-init: got period size 3000
alsa: 96000 Hz/2 channels/8 bpf/384000 bytes buffer/Signed 32 bit Little Endian
AO: [alsa] 96000Hz 2ch s32le (4 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/s32le...
[dummy] Was reinitialized: 96000Hz/2ch/s32le
[dummy] Was reinitialized: 96000Hz/2ch/s32le
Video: no video
Freeing 0 unused video chunks.
Starting playback...
Increasing filtered audio buffer size from 0 to 131072
Increasing filtered audio buffer size from 131072 to 135104
-----
Reply
#6
Ended up with this configuration:

defaults.ctl.card 0
defaults.pcm.card 0
defaults.pcm.device 1

pcm.!default {
type plug
slave {
pcm "hw:0,1"
}
}

Then Kodi is function and mplayer ad vlc is also function,as it did before, ie the same output from default sink as from the command: mplayer -v -ao alsa:device=hw=0.1 /file-to-play

Looks like the card actually takes 192 kHz in 24 bit, some output from a small program I found called alsacap:

Device 0, ID `USB Audio', name `USB Audio', 1 subdevices (1 available)
2 channels, sampling rate 44100..192000 Hz
Sample formats: S16_LE, S24_3LE
Subdevice 0, name `subdevice #0'
Device 1, ID `USB Audio', name `USB Audio #1', 1 subdevices (1 available)
2 channels, sampling rate 44100..192000 Hz
Sample formats: S16_LE, S24_3LE
Subdevice 0, name `subdevice #0'
Device 2, ID `USB Audio', name `USB Audio #2', 1 subdevices (1 available)
2 channels, sampling rate 44100..192000 Hz
Sample formats: S16_LE
Subdevice 0, name `subdevice #0'
Device 3, ID `USB Audio', name `USB Audio #3', 1 subdevices (1 available)
2 channels, sampling rate 44100..192000 Hz
Sample formats: S16_LE, S24_3LE
Subdevice 0, name `subdevice #0'

Kodi does though resample to sample rate 48000 Hz. I DISLIKE!
Reply
#7
You are running an outdated beta, which does not show device enumeration. Upgrade to a nightly.

and post the log again.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#8
(2015-06-09, 09:46)fritsch Wrote: You are running an outdated beta, which does not show device enumeration. Upgrade to a nightly.

and post the log again.

Ok, I try that, hope it is stable. Thanks for your response.
Reply
#9
Afterwards I can tell you, if something like this: http://sourceforge.net/p/alsa/mailman/message/32579059/ is the issue, e.g. shitty drivers - but we will find out.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#10
Looks like it solve the problem!

14:22:03 T:3033270080 INFO: ffmpeg[B4CC0740]: Duration: 00:03:46.99, start: 0.000000, bitrate: 2817 kb/s
14:22:03 T:3033270080 INFO: ffmpeg[B4CC0740]: Stream #0:0: Audio: flac, 96000 Hz, stereo, s32 (24 bit)

<-- if this last line actually is what is sent to the DAC, its outstanding!

(was a bit easier to read old log though, with sampling only on one line)

Either I hacked the DAC ore I got v.2 off it, he!

Thank you Fritsch, you save my day... and probably the week also!
Angel Angel Angel Angel
Reply
#11
Debug Log <- means don't spam the thread, but post the link - then I can tell you.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#12
Ok, sorry!

(edited out the log info above)

My log again then.

http://pastebin.com/kHjP1HuR

Don't look like its is more than 48 000 Hz, what I can see, I did not have full log last time. Now I also
have dbus calls in this log.

EDIT: I change the order off the cards from my first configuration, as you can se. The think is know hw:2.1
Reply
#13
The analog out, is only enumerated 48 khz. The spdif device:

Quote:19:43:29 T:3034036032 NOTICE: Device 6
19:43:29 T:3034036032 NOTICE: m_deviceName : iec958:CARD=Audio,DEV=0
19:43:29 T:3034036032 NOTICE: m_displayName : USB2.0 High-Speed True HD Audio
19:43:29 T:3034036032 NOTICE: m_displayNameExtra: S/PDIF
19:43:29 T:3034036032 NOTICE: m_deviceType : AE_DEVTYPE_IEC958
19:43:29 T:3034036032 NOTICE: m_channels : FL,FR
19:43:29 T:3034036032 NOTICE: m_sampleRates : 44100,48000,88200,96000,176400,192000
19:43:29 T:3034036032 NOTICE: m_dataFormats : AE_FMT_AC3,AE_FMT_DTS,AE_FMT_S24NE3,AE_FMT_S16NE,AE_FMT_S16LE

looks correct.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#14
As it was before then. and back to my main questions,what is this then, and why do mplyer put out higher sample rate?

Device 0, ID `USB Audio', name `USB Audio', 1 subdevices (1 available)
2 channels, sampling rate 44100..192000 Hz
Sample formats: S16_LE, S24_3LE
Subdevice 0, name `subdevice #0'
Device 1, ID `USB Audio', name `USB Audio #1', 1 subdevices (1 available)
2 channels, sampling rate 44100..192000 Hz
Sample formats: S16_LE, S24_3LE
Subdevice 0, name `subdevice #0'
Device 2, ID `USB Audio', name `USB Audio #2', 1 subdevices (1 available)
2 channels, sampling rate 44100..192000 Hz
Sample formats: S16_LE
Subdevice 0, name `subdevice #0'
Device 3, ID `USB Audio', name `USB Audio #3', 1 subdevices (1 available)
2 channels, sampling rate 44100..192000 Hz
Sample formats: S16_LE, S24_3LE
Subdevice 0, name `subdevice #0'
Reply
#15
No idea about mplayer - I don't use it.

From the looks, it seems you got an ALSA issue, cause kodi actually probes(!) the device on enumeration. mplayer might use auto resample, so it's not sure at all what ends up on the sink.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply

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