0

Setup issues and problem with aplay (channels?)

 


Hi,

I have a Raspberry Pi 2 Model B running on Raspbian Jessie. My sound card is a HiFiBerry DAC+.

Initially I tried to follow the latest (?) setup guide on
https://www.hifiberry.com/guides/configuring-linux-3-18-x/
but I didn't find the blacklist file (and from my beginners understanding of a device tree it is not longer needed anyway) and there was no
snd_bcm2835
in /etc/modules
either (the tutorial states that one should remove this line but at the same states that one does not has to edit /etc/modules any more..) Maybe one can update the guide?

Somewhere I also read that one should disable the internal sound card by commenting
dtparam=audio=on
in /boot/config.txt
But then for my user different from "pi" the complete graphical task bar on the desktop does not longer load (took me a while to figure out the correlation, maybe it is because then the audio control fails to load?). The other user was also in the "audio" group.

Anyway, so I just added
dtoverlay=hifiberry-dacplus
to /boot/config.txt
and choose hifiberry (card 1) as the default card by setting
/etc/asound.conf
to
defaults.pcm.card 1
defaults.ctl.card 1

And I'm happy that e.g.
speaker-test -t wav -c 2
worked and I could run mpg123 to listen to mp3 files.

But unfortunately aplay can not play simple wav files.
If I run
aplay /usr/share/sounds/alsa/Front_Right.wav
or even explicitly
aplay -D plughw:1,0 /usr/share/sounds/alsa/Front_Right.wav
I get

Playing WAVE '/usr/share/sounds/alsa/Front_Right.wav' : Signed 16 bit
Little Endian, Rate 48000 Hz, Mono
aplay: set_params:1297: Unable to install hw params:
ACCESS: RW_INTERLEAVED
FORMAT: S16_LE
SUBFORMAT: STD
SAMPLE_BITS: 16
FRAME_BITS: 16
CHANNELS: 1
RATE: 48000
PERIOD_TIME: 125000
PERIOD_SIZE: 6000
PERIOD_BYTES: 12000
PERIODS: 4
BUFFER_TIME: 500000
BUFFER_SIZE: 24000
BUFFER_BYTES: 48000
TICK_TIME: 0

Can you reproduce these problems at your system and comment on it? I had a discussion on the alsa mailing list (see here
http://www.mail-archive.com/alsa-user@lists.sourceforge.net/msg31632.html
) and Clemens thinks it is a problem related with channels and asked for the source code of the driver. Maybe you can combine your experience to solve the problem?

Kind regards,

Hauke

4 comments

Please sign in to leave a comment.