Page 1 of 2

Digi+ , Rune and USB drive = channel swapping

PostPosted: 06 May 2016, 02:23
by piknik
Currently having an issue when playing a file (FLAC), the channels will swap several times during a song. Sometimes it's very subtle, while other times it's quite jarring. The issue only occurs when accessing a mounted USB drive source. When accessing a network mounted source, the files play perfectly.

Hardware: RPi3 with Hifiberry Digi+ board. USB powered Toshiba Canvio Connect hard drive and Canakit 5V 2.5A p.s.
Software: beta 4 image (03212016)

This issue has been discussed at the Hifiberry forum
https://support.hifiberry.com/hc/en-us/ ... nd-DAC-Pro

and here, but pertaining to the DAC Pro boards, not the Digi+.
pi3-and-dac-pro-t3293-60.html

Has RuneAudio been able to duplicate this issue, and if so, is RuneAudio also working with Hifiberry on a fix. It sounds like it's a kernel issue and Hifiberry folks are in touch with the Volumio people, so hopefully parallel efforts are going on here.

Thanks and great product.

Re: Digi+ , Rune and USB drive = channel swapping

PostPosted: 06 May 2016, 13:35
by hondagx35
Hi piknik,

i made some tests with the latest kernel and it seems to solve the problem.

If you like to try it:

- check if you have enough space on your sd card
Code: Select all
df -h

If not (10% or less) first resize your sd card.

- update the kernel and firmware
Code: Select all
pacman -Sy --force raspberrypi-firmware-bootloader linux-raspberrypi
sync


- modify config.txt (add "dtparam=audio=on")
Code: Select all
......
#dtparam=i2c_arm=on
#dtparam=i2c_vc=on
#dtparam=i2s=on
#dtparam=spi=on
#dtparam=act_led_trigger=mmc
dtparam=audio=on

#dtparam=uart1=off
#dtoverlay=pi3-disable-bt-overlay
.......


- remove some files and reboot
Code: Select all
rm /usr/lib/modules-load.d/nfs-utils.conf
rm /etc/modules-load.d/raspberrypi.conf
sync
reboot


- set kernel version (optional)
Code: Select all
uname -a

This will give you the actual version. (e.g. Linux runeaudio 4.4.8-2-ARCH #1 SMP Sat Apr 29 20:07:23 MDT 2016 armv7l GNU/Linux)

Code: Select all
redis-cli set kernel "Linux runeaudio 4.4.8-2-ARCH"


Frank

Re: Digi+ , Rune and USB drive = channel swapping

PostPosted: 06 May 2016, 20:54
by piknik
Bingo! That did it.

After doing your suggested changes and listening for a couple of hours, I haven't heard the channel swapping at all...not even once. I am ecstatic. And to top it off, I can use the full capacity of my mSD card now. :)

Frank, thanks so much for your quick help, very much appreciated.

Re: Digi+ , Rune and USB drive = channel swapping

PostPosted: 06 May 2016, 23:51
by rastus
So, can these instructions be used with the Raspberry Pi 2B and DAC+, or is this specific to the Raspberry Pi 3 and DIGI+?

Re: Digi+ , Rune and USB drive = channel swapping

PostPosted: 07 May 2016, 06:53
by hondagx35
Hi,

as both (RP2/RP3) share the same image this should work.

Frank

Re: Digi+ , Rune and USB drive = channel swapping

PostPosted: 07 May 2016, 07:01
by rastus
hondagx35 > Thank you.

Re: Digi+ , Rune and USB drive = channel swapping

PostPosted: 09 May 2016, 01:39
by rastus
hondagx35 wrote:- modify config.txt (add "dtparam=audio=on")
Code: Select all
......
#dtparam=i2c_arm=on
#dtparam=i2c_vc=on
#dtparam=i2s=on
#dtparam=spi=on
#dtparam=act_led_trigger=mmc
dtparam=audio=on

#dtparam=uart1=off
#dtoverlay=pi3-disable-bt-overlay
.......




So I'm using a Raspberry Pi 2B with a PiFi DAC+, do I need to add this line "dtparam=audio=on" to the config.txt? Is it required?

Re: Digi+ , Rune and USB drive = channel swapping

PostPosted: 09 May 2016, 05:57
by hondagx35
Hi rastus,

do I need to add this line "dtparam=audio=on" to the config.txt? Is it required?

Audio

alsa-utils should supply the needed programs to use onboard sound. Default volume can be adjusted using alsamixer.

A key change with Linux kernel version 4.4.x for ARM related to ALSA and to the needed sound module: in order to use tools such as alsamixer with the current kernel, users must modify /boot/config.txt to contain the following line:

dtparam=audio=on


Frank

Re: Digi+ , Rune and USB drive = channel swapping

PostPosted: 09 May 2016, 08:35
by rastus
hondagx35 wrote:Audio

alsa-utils should supply the needed programs to use onboard sound. Default volume can be adjusted using alsamixer.

A key change with Linux kernel version 4.4.x for ARM related to ALSA and to the needed sound module: in order to use tools such as alsamixer with the current kernel, users must modify /boot/config.txt to contain the following line:

dtparam=audio=on


Good call, I followed your instructions (above) today but did not add this line to the config.txt file: dtparam=audio=on, I then played some music and it played fine, sounded great. Then I logged into the Pi to change alsamixer settings, and it did not work, alsamixer loaded but I couldn't change the settings. I thought, that's strange. So now I know why, I will add that line. Your instructions were very thorough and easy to follow. Now running Linux version 4.4.9-1-ARCH (builduser@leming) (gcc version 5.3.0 (GCC) ) #1 SMP. Thank you berry much brother.

Kindest regards,

rastus

Re: Digi+ , Rune and USB drive = channel swapping

PostPosted: 12 May 2016, 11:54
by Dohmar
FYI users with certain HATs will need the parameter to read dtoverlay=audio=off

https://discourse.osmc.tv/t/january-upd ... g/12675/19

I have a iqaudio_dac (x400) and this update has killed my sound. Im just working through a few things to try and get the DAC detected. So far no luck

Dmesgs gives me
Code: Select all
[    5.670597] snd-rpi-iqaudio-dac soc:sound: ASoC: CPU DAI (null) not registered
[    5.670607] snd-rpi-iqaudio-dac soc:sound: snd_soc_register_card() failed: -517
[    5.695374] bcm2835-wdt 3f100000.watchdog: Broadcom BCM2835 watchdog timer
[    5.696476] snd-rpi-iqaudio-dac soc:sound: ASoC: CODEC DAI pcm512x-hifi not registered
[    5.696494] snd-rpi-iqaudio-dac soc:sound: snd_soc_register_card() failed: -517
[    5.701811] gpiomem-bcm2835 3f200000.gpiomem: Initialised: Registers at 0x3f200000
[    5.701971] snd-rpi-iqaudio-dac soc:sound: ASoC: CODEC DAI pcm512x-hifi not registered
[    5.701979] snd-rpi-iqaudio-dac soc:sound: snd_soc_register_card() failed: -517
[    5.982638] snd-rpi-iqaudio-dac soc:sound: ASoC: CODEC DAI pcm512x-hifi not registered
[    5.982664] snd-rpi-iqaudio-dac soc:sound: snd_soc_register_card() failed: -517
[    5.987111] brcmfmac: brcmf_sdio_drivestrengthinit: No SDIO Drive strength init done for chip 43430 rev 1 pmurev 24
[    5.987734] usbcore: registered new interface driver brcmfmac
[    5.987831] snd-rpi-iqaudio-dac soc:sound: ASoC: CODEC DAI pcm512x-hifi not registered
[    5.987841] snd-rpi-iqaudio-dac soc:sound: snd_soc_register_card() failed: -517
[    6.578665] bcm2835-rng 3f104000.rng: hwrng registered
[    6.578834] snd-rpi-iqaudio-dac soc:sound: ASoC: CODEC DAI pcm512x-hifi not registered
[    6.578841] snd-rpi-iqaudio-dac soc:sound: snd_soc_register_card() failed: -517


-D