muhackl
Posts: 11
Joined: Sun Dec 16, 2012 7:11 am

Get 192khz/24bit working?

Sun Dec 16, 2012 7:15 am

Dear Rasperry Pi community

as high end hifi enthusiast, I appreciate the sound of flac files using 192khz/24bit quality.
What settings/add ons/magic do I have to use, to get my Raspberry Pi (Version B, 512 MB RAM) playing back those files via HDMI?

When playing back those files with raspmc, you can see the visualizer doing some dancing, but no sound can be heared - neither via HDMI, nor via the analog output.

I don't stick to raspmc - I'd use any distro just to get it working.

I appreciate your help and thank you a lot in advance.

JoeBtfsplk
Posts: 14
Joined: Tue Aug 16, 2011 10:36 pm

Re: Get 192khz/24bit working?

Tue Dec 18, 2012 6:23 am

I can't answer your question but I have one for you. What do you have on the other end of the HDMI that can support such high headroom specs and actually get it out the analog door?

ski522
Posts: 394
Joined: Sun Sep 30, 2012 2:22 pm

Re: Get 192khz/24bit working?

Tue Dec 18, 2012 2:27 pm

muhackl wrote:Dear Rasperry Pi community

as high end hifi enthusiast, I appreciate the sound of flac files using 192khz/24bit quality.
as hi-fi enthusiast myself, take a look at this article...you might be surprised to learn that bigger is not necessarily better in some cases http://people.xiph.org/~xiphmont/demo/neil-young.html.

Not sure how the PI handles audio on it's HDMI port, but you might want to looking into a USB DAC instead and feed you're stereo PCM via a digital connection (spdif)

JoeBtfsplk
Posts: 14
Joined: Tue Aug 16, 2011 10:36 pm

Re: Get 192khz/24bit working?

Tue Dec 18, 2012 7:52 pm

Many thanks for the debunking link! I was about to embark on a search for a good debunking article myself. As an E.E. with lots of audio DSP experience I can say that the article is the real deal and can be trusted to be factually correct. Unfortunately, there is no evidence or explanation that the 'philes are going to believe. They've heard the differences themselves (and likely have wasted large amounts of money convincing themselves of that.) :-)

I'd still love to find an audio codec with such high headroom specs that can sit at the end of an HDMI cable but I keep forgetting that you have to fork over large payoffs and jump through many formidably placed hoops to get the right and even the ability to functionally connect to HDMI.

tghewett
Posts: 3
Joined: Mon Mar 25, 2013 7:53 pm

Re: Get 192khz/24bit working?

Mon Mar 25, 2013 8:24 pm

I have 192kHz/32bit HDMI audio working with kernel 3.2.27+. I tried 24bit but no go, decided 32bit was good enough, just zero the least significant byte and get 24bits.

Receipt of 192kHz sample rate confirmed by display on AV receiver, can't confirm more than 16 bits are being sent as have no equipment which can record the HDMI signal, but since it plays fine at the 32bit setting it would seem reasonable to conclude that all the bits are being sent.

To get this you need to know how to build a linux kernel, though I attach a replacement snd-bcm2835.ko loadable BCM2835 module in case you want to try it out (copy it into the appropriate place in /lib/modules, saving the old file just in case) [EDIT: tried to upload the file but no go]. The file to change is in the kernel sources in sound/arm/bcm2835-pcm.c. Change these lines:

Code: Select all

        .formats = SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE,
        .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000,
        .rate_min = 8000,
        .rate_max = 48000,
        .channels_min = 1,
        .channels_max = 2,
to

Code: Select all

        .formats = SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S32_LE,
        .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_192000,
        .rate_min = 8000,
        .rate_max = 192000,
        .channels_min = 1,
        .channels_max = 2,
and then build your kernel and modules. http://mitchtech.net/raspberry-pi-kernel-compile/ has a good guide for cross-compiling the kernel on a PC, my 2GHZ dual core builds it in under 20 minutes compared to over 6 hours on the Pi.

Also tried changing channels_max to 8 so see if it was possible to get 8 PCM channels working, no go for my AV receiver, it thought it was getting 3 channels and the sound was garbled.

So far no problems at all. I haven't tried setting the playback route to analogue to see what the D-A thinks about 192kHz but it probably won't like it very much. [EDIT don't send more than 48kHz to the analogue device, the OS will crash].

Also tried to see if passthrough was possible to allow AC3/DTS over HDMI - in the device driver I changed the ALSA volume control to directly set the chip without going through the "(vol * 100) / 256" conversion (see macro in bcm2835.h - this loses possibly vital increments) and tried a range of volume settings to see if one did nothing more than multiply the samples by 1.0 to provide true passthrough, no go again. My receiver will definitely decodes AC3/DTS sent over HDMI in this way but anything sent from the Pi comes out as noise no matter what.

I find that kernel 3.6.11+ panics when using the BCM2835 audio device so haven't bothered trying that, but the same changes should work just as well.

vmsda
Posts: 32
Joined: Tue Mar 12, 2013 5:02 pm

Re: Get 192khz/24bit working?

Tue Mar 26, 2013 4:47 pm

muhackl wrote:Dear Rasperry Pi community

as high end hifi enthusiast, I appreciate the sound of flac files using 192khz/24bit quality.
What settings/add ons/magic do I have to use, to get my Raspberry Pi (Version B, 512 MB RAM) playing back those files via HDMI? ... - I'd use any distro just to get it working.
I am in the same boat, although I have very few high-rez downloads, the overwhelming majority of my classical music collection is from ripping my CDs.

I am using Debian Wheezy at the moment, with the Raspberry Pi connected to my Benchmark DAC via USB; using Alsa, MPD and NCMPC in the RPi, commanded via SSH from Ubuntu 12.04 (pls see signature).

Two workarounds definitely improved the situation: 1. All usb devices (wifi dongle, music hdd, dac) are connected to RPi via a Plugable 4-port usb hub (this I consider a must); 2. coding nrpacks=1 for snd-usb-audio in modprobe.d.

Hope this gives you some ideas.

But 192Khz/24bit has been beyond the limitations of this system; the music does start playing, but soon sync is obviously lost. I do not know whether the RPi does not like the fact that my DAC uses asynchronous transfer over the USB interface.

In another topic, I complained about occasional crackling and was informed that "This is a known issue and there are several threads about this. It is caused by a USB bug that is being worked on. The current workaround is to limit the USB to 1.1 by adding dwc_otg.speed=1 to /boot/cmdline.txt".
The workaround did not work for me, so I have resigned to waiting for the fix.
Samsung 900X, Ubuntu 12.04 host, VirtualBox, Windows 7 guest.
Raspberry Pi running 2013-02-09-wheezy-raspbian.img; Edimax EW-7811Un 802.11b/g/n adapter; Plugable USB2.0 4-port Hub.

smashedcrab
Posts: 5
Joined: Mon Mar 25, 2013 3:01 am

Re: Get 192khz/24bit working?

Thu Mar 28, 2013 5:10 am

If dwc_otg.speed=1 Does NOT work. .

I found one can edit the cmdline.txt file on the flash disk from another machine (eg windows) !

vmsda
Posts: 32
Joined: Tue Mar 12, 2013 5:02 pm

Re: Get 192khz/24bit working?

Thu Mar 28, 2013 11:07 am

smashedcrab wrote:If dwc_otg.speed=1 Does NOT work. .

I found one can edit the cmdline.txt file on the flash disk from another machine (eg windows) !
... or from any Linux distro for that matter ...
Samsung 900X, Ubuntu 12.04 host, VirtualBox, Windows 7 guest.
Raspberry Pi running 2013-02-09-wheezy-raspbian.img; Edimax EW-7811Un 802.11b/g/n adapter; Plugable USB2.0 4-port Hub.

MOCKBA
Posts: 1
Joined: Fri Jun 14, 2013 6:46 am

Re: Get 192khz/24bit working?

Fri Jun 14, 2013 6:59 am

vmsda wrote:
muhackl wrote:Dear Rasperry Pi community

as high end hifi enthusiast, I appreciate the sound of flac files using 192khz/24bit quality.
What settings/add ons/magic do I have to use, to get my Raspberry Pi (Version B, 512 MB RAM) playing back those files via HDMI? ... - I'd use any distro just to get it working.
I am in the same boat, although I have very few high-rez downloads, the overwhelming majority of my classical music collection is from ripping my CDs.

I am using Debian Wheezy at the moment, with the Raspberry Pi connected to my Benchmark DAC via USB; using Alsa, MPD and NCMPC in the RPi, commanded via SSH from Ubuntu 12.04 (pls see signature).

Two workarounds definitely improved the situation: 1. All usb devices (wifi dongle, music hdd, dac) are connected to RPi via a Plugable 4-port usb hub (this I consider a must); 2. coding nrpacks=1 for snd-usb-audio in modprobe.d.

Hope this gives you some ideas.

But 192Khz/24bit has been beyond the limitations of this system; the music does start playing, but soon sync is obviously lost. I do not know whether the RPi does not like the fact that my DAC uses asynchronous transfer over the USB interface.

In another topic, I complained about occasional crackling and was informed that "This is a known issue and there are several threads about this. It is caused by a USB bug that is being worked on. The current workaround is to limit the USB to 1.1 by adding dwc_otg.speed=1 to /boot/cmdline.txt".
The workaround did not work for me, so I have resigned to waiting for the fix.
New Raspbian has no problem of 24/192 playback. I connected to 24/192 capable receiver through HDMI. I plan also buy another Raspberry Pi to listen to music using headphones and DAC amplifier connected through USB. I will report how it goes. Note my music player is java program Music Barrel.

usul27
Posts: 23
Joined: Mon Nov 26, 2012 9:54 am

Re: Get 192khz/24bit working?

Thu Oct 24, 2013 1:59 pm

I got it running without USB by directly connecting to the I2S port of the SoC. Works well :-)
http://www.crazy-audio.com/2013/10/hifi ... -solution/

Thanks to all the guys that works on the drivers for this!

remaeder
Posts: 13
Joined: Wed Jan 23, 2013 8:27 am
Location: Switzerland

Re: Get 192khz/24bit working?

Thu Oct 24, 2013 3:40 pm

192/24 definitely works these days. There is an excellent software squeeze player piCorePlayer, see https://sites.google.com/site/picoreplayer/home that outputs this resolution just fine over HDMI. I feed it into my surround receiver (Onkyo TX-NR5009) and it sounds great.

Roman

Return to “Graphics, sound and multimedia”