lintweaker / mpd-dsd-019

DSD specific patches for MPD 0.19
GNU General Public License v2.0
10 stars 4 forks source link

Audio GD NFB-1 (usb via vinyl audio vt1731 try to dsd_native)) #12

Closed norrest closed 8 years ago

norrest commented 8 years ago

Finally, established mpd-dsd! But I think probably there is a problem with the configuration of the kernel!

cd /usr/include/sound cat asound.h | grep DSD

define SNDRV_PCM_FORMAT_DSD_U8 ((snd_pcm_format_t) 48) /* DSD, 1-byte samples DSD (x8) */

define SNDRV_PCM_FORMAT_DSD_U16_LE ((snd_pcm_format_t) 49) /* DSD, 2-byte samples DSD (x16), little endian */

define SNDRV_PCM_FORMAT_LAST SNDRV_PCM_FORMAT_DSD_U16_LE

I do not FIND SNDRV_PCM_FORMAT_LAST SNDRV_PCM_FORMAT_DSD_U32_BE

Reports U can find in attachment`s file!

AUDIO-GD.zip

norrest commented 8 years ago

I forgot to add that there is no sound (in these modes), only squeak !!!

lintweaker commented 8 years ago

Content of /usr/include/sound comes from the kernel-headers package. Did you install these (from a recent or DSD patched kernel) ?

There is no native DSD support for Audio GD in the kernel.

norrest commented 8 years ago

No i dont! I use ARMBIAN install based on Kernel 4.4.* So..

lintweaker commented 8 years ago

Yes, your kernel is new enough, but your kernel-headers (or linux-headers) or not.

norrest commented 8 years ago

Ok! I must to just install kernel-headers and test again?

norrest commented 8 years ago

dpkg --list 'linux-*' Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-====================================-=======================-=======================-============================================================================= ii linux-dtb-dev-sunxi 4.83 armhf Linux DTB, version 4.4.0-sunxi ii linux-firmware-image-dev-sunxi 4.83 armhf Linux kernel firmware, version 4.4.0-sunxi un linux-headers (no description available) ii linux-headers-dev-sunxi 4.83 armhf Linux kernel headers for 4.4.0-sunxi on armhf un linux-image (no description available) un linux-image-2.6 (no description available) ii linux-image-dev-sunxi 4.83 armhf Linux kernel, version 4.4.0-sunxi ii linux-jessie-root-cubieboard 4.83 armhf Root file system tweaks for cubieboard un linux-kernel-headers (no description available) un linux-kernel-log-daemon (no description available) ii linux-libc-dev:armhf 3.16.7-ckt20-1+deb8u2 armhf Linux support headers for userspace development un linux-modules-4.4.0-sunxi (no description available)

norrest commented 8 years ago

dpkg -s 'linux-headers-dev-sunxi' Package: linux-headers-dev-sunxi Status: install ok installed Priority: optional Section: kernel Installed-Size: 50534 Maintainer: Igor Pecovnik igor.pecovnik@****l.com Architecture: armhf Source: linux-4.4.0-sunxi Version: 4.83 Provides: linux-headers Description: Linux kernel headers for 4.4.0-sunxi on armhf This package provides kernel header files for 4.4.0-sunxi on armhf . This is useful for people who need to build external modules

norrest commented 8 years ago

i Found linux-libc-dev:armhf https://packages.debian.org/sid/armhf/linux-libc-dev/filelist /usr/include/sound/asequencer.h /usr/include/sound/asound.h /usr/include/sound/asound_fm.h /usr/include/sound/compress_offload.h /usr/include/sound/compress_params.h /usr/include/sound/emu10k1.h /usr/include/sound/firewire.h /usr/include/sound/hdsp.h /usr/include/sound/hdspm.h /usr/include/sound/sb16_csp.h /usr/include/sound/sfnt_info.h

Try sudo apt-get remove linux-libc-dev:armhf

norrest commented 8 years ago

cd /usr/include/sound -bash: cd: /usr/include/sound: No such file or directory F****K!!

norrest commented 8 years ago

wget ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.1.0.tar.bz2 ./configure && make make install wget ftp://ftp.alsa-project.org/pub/plugins/alsa-plugins-1.1.0.tar.bz2 ./configure && make make install

cd /usr/include/sound /usr/include/sound# cat asound.h | grep DSD

define SNDRV_PCM_FORMAT_DSD_U8 ((snd_pcm_formatt) 48) /* DSD, 1-byte samples DSD (x8) /

define SNDRV_PCM_FORMAT_DSD_U16_LE ((snd_pcm_formatt) 49) / DSD, 2-byte samples DSD (x16), little endian */

define SNDRV_PCM_FORMAT_LAST SNDRV_PCM_FORMAT_DSD_U16_LE

cd /usr/src/alsa/alsa-lib-1.1.0/include/sound /usr/src/alsa/alsa-lib-1.1.0/include/sound# cat asound.h | grep DSD

define SNDRV_PCM_FORMAT_DSD_U8 ((__force snd_pcm_formatt) 48) /* DSD, 1-byte samples DSD (x8) /

define SNDRV_PCM_FORMAT_DSD_U16_LE ((__force snd_pcm_formatt) 49) / DSD, 2-byte samples DSD (x16), little endian _/

define SNDRV_PCM_FORMAT_DSD_U32_LE ((__force snd_pcm_formatt) 50) / DSD, 4-byte samples DSD (x32), little endian _/

define SNDRV_PCM_FORMAT_DSD_U16_BE ((__force snd_pcm_formatt) 51) / DSD, 2-byte samples DSD (x16), big endian _/

define SNDRV_PCM_FORMAT_DSD_U32_BE ((__force snd_pcm_formatt) 52) / DSD, 4-byte samples DSD (x32), big endian */

define SNDRV_PCM_FORMAT_LAST SNDRV_PCM_FORMAT_DSD_U32_BE

Why install not update asound.h ??

lintweaker commented 8 years ago

/usr/include/sound/asound.h should come from kernel headers package matching your kernel version. Maybe you can try reinstalling it. On ARM systems getting the correct version can be difficult.

I this fails please ask on a appropriate mailinglist or forum for the distribution you use.

norrest commented 8 years ago

for make need some libraries , i install it using apt-get install build-essential automake autoconf libtool pkg-config libcurl4-openssl-dev intltool libxml2-dev libgtk2.0-dev libnotify-dev libglib2.0-dev libevent-dev dh-make apt-get install libboost-all-dev and i found again pkg -l 'linux-libc-dev:*' Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-====================================-=======================-=======================-============================================================================= ii linux-libc-dev:armhf 3.16.7-ckt20-1+deb8u2 armhf Linux support headers for userspace development

lintweaker commented 8 years ago

linux-libc-dev is not the same as kernel headers. On Debian based systems it should be called something like 'linux-headers'

apt-cache search linux-headers-$(uname -r)

If no headers for your current kernel are found bug your OS supplier. This is not a MPD-019 patch issue.

norrest commented 8 years ago

UPD! I install new version of linux-libc-dev:armhf from https://packages.debian.org/sid/armhf/linux-libc-dev/download dpkg -l 'linux-libc-dev*' Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-====================================-=======================-=======================-============================================================================= ii linux-libc-dev:armhf 4.3.3-5 armhf Linux support headers for userspace development

cat asound.h | grep DSD

define SNDRV_PCM_FORMAT_DSD_U8 ((snd_pcm_formatt) 48) /* DSD, 1-byte samples DSD (x8) /

define SNDRV_PCM_FORMAT_DSD_U16_LE ((snd_pcm_formatt) 49) / DSD, 2-byte samples DSD (x16), little endian _/

define SNDRV_PCM_FORMAT_DSD_U32_LE ((snd_pcm_formatt) 50) / DSD, 4-byte samples DSD (x32), little endian _/

define SNDRV_PCM_FORMAT_DSD_U16_BE ((snd_pcm_formatt) 51) / DSD, 2-byte samples DSD (x16), big endian _/

define SNDRV_PCM_FORMAT_DSD_U32_BE ((snd_pcm_formatt) 52) / DSD, 4-byte samples DSD (x32), big endian */

define SNDRV_PCM_FORMAT_LAST SNDRV_PCM_FORMAT_DSD_U32_BE

and install new version of grep VERSION_STR /usr/include/alsa/version.h

define SND_LIB_VERSION_STR "1.1.0"

and now cat asound.h | grep DSD

define SNDRV_PCM_FORMAT_DSD_U8 ((snd_pcm_formatt) 48) /* DSD, 1-byte samples DSD (x8) /

define SNDRV_PCM_FORMAT_DSD_U16_LE ((snd_pcm_formatt) 49) / DSD, 2-byte samples DSD (x16), little endian _/

define SNDRV_PCM_FORMAT_DSD_U32_LE ((snd_pcm_formatt) 50) / DSD, 4-byte samples DSD (x32), little endian _/

define SNDRV_PCM_FORMAT_DSD_U16_BE ((snd_pcm_formatt) 51) / DSD, 2-byte samples DSD (x16), big endian _/

define SNDRV_PCM_FORMAT_DSD_U32_BE ((snd_pcm_formatt) 52) / DSD, 4-byte samples DSD (x32), big endian */

define SNDRV_PCM_FORMAT_LAST SNDRV_PCM_FORMAT_DSD_U32_BE

BUT!!!

audio_output {

     type       "alsa"
     name       "Output"
     device     "hw:1,0"
             dop "no"
             #use_mmap        "yes"
             dsd_native "yes"
             dsd_native_type    "0"
             mixer_type "none"
             auto_resample "no"
             auto_channels "no"
             auto_format "no"

}

cat /proc/asound/card1/pcm0p/sub0/hw_params access: RW_INTERLEAVED format: S24_3LE subformat: STD channels: 2 rate: 352800 (352800/1) period_size: 43691 buffer_size: 174762

cat /proc/asound/card1/stream0 Audio-gd Audio-gd at usb-1c1c000.usb-1, high speed : USB Audio

Playback: Status: Running Interface = 1 Altset = 2 Packet Size = 582 Momentary freq = 352816 Hz (0x2c.1a1a) Feedback Format = 16.16 Interface 1 Altset 1 Format: S16_LE Channels: 2 Endpoint: 4 OUT (ASYNC) Rates: 44100, 48000, 88200, 96000, 176400, 192000, 352800, 384000 Data packet interval: 500 us

for audio_output {

     type       "alsa"
     name       "Output"
     device     "hw:1,0"
             dop "no"
             #use_mmap        "yes"
             dsd_native "yes"
             dsd_native_type    "2"
             mixer_type "none"
             auto_resample "no"
             auto_channels "no"
             auto_format "no"

}

norrest commented 8 years ago

Ok! wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.4.tar.xz

cp /boot/config-$( uname -r ) .config

zcat /proc/config.gz > .config

make oldconfig make-kpkg clean fakeroot make-kpkg --initrd --revision=20160101 kernel_image fakeroot make-kpkg --initrd --revision=20160101 kernel_headers change uboot file -> vmlinuz-4.4.0 dpkg -i * reboot! BUT ITS NOT HELP ME!!!! maybe i need again reinstall mpd?

norrest commented 8 years ago

mpd -V Music Player Daemon 0.19.12-dsd

Copyright (C) 2003-2007 Warren Dukes warren.dukes@gmail.com Copyright (C) 2008-2014 Max Kellermann max@duempel.org This is free software; see the source for copying conditions. There is NO warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Database plugins: simple proxy upnp

Storage plugins: local smbclient nfs

Neighbor plugins: smbclient upnp

Decoders plugins: [mad] mp3 mp2 [mpg123] mp3 [vorbis] ogg oga [oggflac] ogg oga [flac] flac [opus] opus ogg oga [sndfile] wav aiff aif au snd paf iff svx sf voc w64 pvf xi htk caf sd2 [audiofile] wav au aiff aif [dsdiff] dff [dsf] dsf

Do not Help! May be some problems with kernel?

lintweaker commented 8 years ago

Good to see you overcame the kernel and mpd hurdle.

As I have mentioned earlier, there is no native DSD support for your Audio GD NFB-1 DAC. So you do not have any device actually using one of the native DSD sample formats. There is no Audio device for MPD to actually use the DSD sample formats on, It will fall back to DSD->PCM conversion. Your best option for DSD is using DoP (if your DAC supports that).

norrest commented 8 years ago

Hi FRIEND!

in quirks /* XMOS based USB DACs _/ switch (chip->usb_id) { case USBID(0x20b1, 0x3008): / iFi Audio micro/nano iDSD _/ case USBID(0x20b1, 0x2008): / Matrix Audio X-Sabre _/ case USBID(0x20b1, 0x300a): / Matrix Audio Mini-i Pro _/ case USBID(0x040d, 0x3410): / Audio GD VIA USB-32 DAC */ if (fp->altsetting == 2) return SNDRV_PCM_FMTBIT_DSD_U32_BE; break;

case USB_ID(0x20b1, 0x000a): /* Gustard DAC-X20U */
case USB_ID(0x20b1, 0x2009): /* DIYINHK DSD DXD 384kHz USB to I2S/DSD */
case USB_ID(0x20b1, 0x2023): /* JLsounds I2SoverUSB */
case USB_ID(0x20b1, 0x3023): /* Aune X1S 32BIT/384 DSD DAC */
case USB_ID(0x2616, 0x0106): /* PS Audio NuWave DAC */
    if (fp->altsetting == 3)
        return SNDRV_PCM_FMTBIT_DSD_U32_BE;
    break;
default:
    break;
}

i add case USB_ID(0x040d, 0x3410): /* Audio GD VIA USB-32 DAC */

so if DSD Native mode = 0 i found Format: S24_3LE DSD_U32_BE

Playback: Status: Running Interface = 1 Altset = 2 Packet Size = 582 Momentary freq = 352816 Hz (0x2c.1a1a) Feedback Format = 16.16 Interface 1 Altset 1 Format: S16_LE Channels: 2 Endpoint: 4 OUT (ASYNC) Rates: 44100, 48000, 88200, 96000, 176400, 192000, 352800, 384000 Data packet interval: 500 us Interface 1 Altset 2 Format: S24_3LE DSD_U32_BE Channels: 2 Endpoint: 4 OUT (ASYNC) Rates: 44100, 48000, 88200, 96000, 176400, 192000, 352800, 384000 Data packet interval: 250 us 002/002 040d:3410 USB Mixer: usb_id=0x040d3410, ctrlif=0, ctlerr=0 Card: Audio-gd Audio-gd at usb-1c1c000.usb-1, high speed Unit: 12 Control: name="PCM Playback Volume", index=0 Info: id=12, control=2, cmask=0x3, channels=2, type="S16" Volume: min=-10240, max=0, dBmin=-4000, dBmax=0 Unit: 12 Control: name="PCM Playback Switch", index=0 Info: id=12, control=1, cmask=0x0, channels=1, type="INV_BOOLEAN" Volume: min=0, max=1, dBmin=0, dBmax=0

access: RW_INTERLEAVED format: S24_3LE subformat: STD channels: 2 rate: 352800 (352800/1) period_size: 43691 buffer_size: 174762

so if DSD Native mode = 2 Music do not start!

In evening i check sound ( I now through Remote Desktop ( Is there some kind of perspective?