Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Newbee - Use Moode on "pur" RPi 3B+
#1
Hi,

I just tried Moode with a HifiBerry Digi+pro and it worked great and easy from the beginning. Saying that, I had it connected with three wires: power, S/PDIF and Ethernet. Now I want to reduce the wires and the HW. I am stuck , when I try to play music over BT without the HifiBerry HAT. I configured the I2S Audiodevice to "None", I can connect the Speakers through BT, but when I try to play a title, I get the following message:

Code:
MPD error

Failed to open "ALSA bluetooth" [alsa]; Error opening ALSA device "btstream"; snd_pcm_hw_params() failed: Invalid argument

My /boot/config.txt looks like the following:
Code:
disable_splash=1
#hdmi_drive=2
dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=audio=on
#dtoverlay=pi3-disable-wifi
#dtoverlay=pi3-disable-bt

So I currently disabled i2s, hdmi ( headless ) and dtparam(audio). Enabling all or partial don't make the difference. 
with systemctl list-units I get

Code:
sys-subsystem-bluetooth-devices-hci0.device                                                          loaded active plugged   /sys/subsystem/bluetooth/devices/hci0                                                
● bluealsa-aplay@CC:90:93:0B:C2:97.service                                                             loaded failed failed    BlueAlsa-Aplay                                                                        
 bluealsa.service                                                                                     loaded active running   BluezAlsa proxy                                                                      
 bluetooth.service                                                                                    loaded active running   Bluetooth service                                                                    
 system-bluealsa\x2daplay.slice                                                                       loaded active active    system-bluealsa\x2daplay.slice                                                        
 bluetooth.target                                                                                     loaded active active    Bluetooth                     
which shows that bluealsa-aplay is not running. And now I am stuck  Huh Any suggestions ?
Reply
#2
Hi,

I just did a quick test with I2S=None and playing to my Anker Soundcore Bluetooth speaker worked just fine.

Below is config.txt
Code:
pi@rp3:~ $ cat /boot/config.txt
disable_splash=1
hdmi_drive=2
dtparam=i2c_arm=on
dtparam=i2s=on
dtparam=audio=on
#dtoverlay=pi3-disable-wifi
#dtoverlay=pi3-disable-bt
pi@rp3:~ $

Btw, I placed your error messages and log output in code boxes for readability :-) The code box button is 3rd from the right on the toolbar.

-Tim
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
(11-29-2018, 12:17 PM)Tim Curtis Wrote: Hi,

I just did a quick test with I2S=None and playing to my Anker Soundcore Bluetooth speaker worked just fine.

Below is config.txt
Code:
pi@rp3:~ $ cat /boot/config.txt
disable_splash=1
hdmi_drive=2
dtparam=i2c_arm=on
dtparam=i2s=on
dtparam=audio=on
#dtoverlay=pi3-disable-wifi
#dtoverlay=pi3-disable-bt
pi@rp3:~ $

Btw, I placed your error messages and log output in code boxes for readability :-) The code box button is 3rd from the right on the toolbar.

-Tim
Thanks for formating - indeed it is better readable. I tried a new download, which has the same config.txt like you posted. After a quick check that failed with the Nubert X600 ( these are the speakers I want to connect ) , I tried another speaker ( one of these noisy boxes ) JBL Clip2.
While I can pair and connect to the speakers, I am still not able to play music.
This time at least I don't get any errors on
Code:
systemctl
. Oh , wait: I did an
Code:
apt-get update&upgrade
and now it plays a radio stream and the left/right demo on the speakers ! Ok in principle it should work. Now it looks like it could not play AAC - only ALAC ( these are in generic my two types of files : iTunes bought or Apple Lossless scraped CD's ).

Is there any setup available to get AAC ( Apple Audio Codec ) running ?
Reply
#4
I have some AAC encoded files that play just fine.

What does MPD log show?

cat /var/log/mpd/log
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#5
(11-29-2018, 04:11 PM)Tim Curtis Wrote: I have some AAC encoded files that play just fine.

What does MPD log show?

cat /var/log/mpd/log

for all AAC that are not played I receive the following:


Code:
Nov 29 17:41 : exception: Failed to open "ALSA bluetooth" [alsa]
Nov 29 17:41 : exception: nested: Error opening ALSA device "btstream"
Nov 29 17:41 : exception: snd_pcm_hw_params() failed: Invalid argument

Mediainfo of this file is: "

Code:
mediainfo 01\ Melancholisch\ schön.m4a 
General
Complete name                            : 01 Melancholisch schön.m4a
Format                                   : MPEG-4
Format profile                           : Apple audio with iTunes info
Codec ID                                 : M4A  (M4A /mp42/isom)
File size                                : 7.26 MiB
Duration                                 : 3 min 39 s
Overall bit rate mode                    : Constant
Overall bit rate                         : 277 kb/s
Album                                    : Melancholisch schön
Album/Performer                          : 2raumwohnung
Part/Position                            : 1
Part/Total                               : 1
Track name                               : Melancholisch schön
Track name/Position                      : 1
Track name/Total                         : 11
Performer                                : 2raumwohnung
Composer                                 : Inga Humpe, Tommi Eckart
Genre                                    : Pop
ContentType                              : Music
Recorded date                            : UTC 2005-06-20 07:00:00
Encoded date                             : UTC 2007-09-06 19:16:37
Tagged date                              : UTC 2017-02-28 23:20:17
Copyright                                : ℗ 2005 it sounds GmbH
Service name                             : iTunes
Cover                                    : Yes / Yes
Comment                                  : UnvAlb
Rating                                   : None
tool                                     : 144255989988720642
AppleStoreAccount                        : owneremail
AppleStoreCatalogID                      : 263711790
AlbumTitleID                             : 73008473
cmID                                     : 263659767
PlayListID                               : 263711778
GenreID                                  : 14
AppleStoreCountry                        : Germany
AppleStoreAccountType                    : iTunes
PurchaseDate                             : 2010-09-18 10:17:48

Audio
ID                                       : 1
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Codec ID                                 : mp4a-40-2
Duration                                 : 3 min 39 s
Bit rate mode                            : Constant
Bit rate                                 : 256 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 44.1 kHz
Frame rate                               : 43.066 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 6.69 MiB (92%)
Encoded date                             : UTC 2007-09-06 19:16:37
Tagged date                              : UTC 2017-02-28 23:20:17

I also tried newer AAC files , which have little diffrent structure/output and they also not working yet. (Codec ID is always the same ). Hmm - I try to get more "google" answers. And will also try if I could play them with the HifiBerry mounted (which would be strange, but we will see)

[Update] ok, it also doesn't work when Hifiberry Digi+Pro is mounted and configured as BT. When I configure the Hifiberry to use the S/PDIF Link, it works also with AAC - regardsless how old they are. So it is a BT driver problem. It looks a bit that the configuration/setup for AAC might be wrong. Any tipps, where I could start my search ?
Reply
#6
I think I've just bumped into the same issue with WMA files over bluetooth (Pi0, Pimoroni pHatDAC and AKG C50BT headphones on Moode 4.4)

Everything works well through wired connection but Moode refuses to play WMA files over a bluetooth connection showing this error:

MPD error

Failed to open "ALSA bluetooth" [alsa]; Error opening ALSA device "btstream"; snd_pcm_hw_params() failed: Invalid argument

Both Mp3 and FLAC play fine over Moode via bluetooth

cat /var/log/mpd/log


Code:
Dec 30 08:49 : player: played "SDCARD/Linn Christmas 2015/07 - Sophisticated Lady.flac"
Dec 30 08:49 : exception: Failed to open "ALSA bluetooth" [alsa]
Dec 30 08:49 : exception: nested: Error opening ALSA device "btstream"
Dec 30 08:49 : exception: snd_pcm_hw_params() failed: Invalid argument
Dec 30 08:49 : exception: Failed to open "ALSA bluetooth" [alsa]
Dec 30 08:49 : exception: nested: Error opening ALSA device "btstream"
Dec 30 08:49 : exception: snd_pcm_hw_params() failed: Invalid argument
Dec 30 08:49 : player: problems opening audio device while playing "NAS/Musikbank/The Waterboys (FLAC)/Fisherman's Blues/01 Fisherman's Blues.wma"
Dec 30 08:49 : player: played "NAS/Musikbank/The Waterboys (FLAC)/Fisherman's Blues/01 Fisherman's Blues.wma"
Dec 30 08:49 : exception: Failed to open "ALSA bluetooth" [alsa]
Dec 30 08:49 : exception: nested: Error opening ALSA device "btstream"
Dec 30 08:49 : exception: snd_pcm_hw_params() failed: Invalid argument
Dec 30 08:49 : exception: Failed to open "ALSA bluetooth" [alsa]
Dec 30 08:49 : exception: nested: Error opening ALSA device "btstream"
Dec 30 08:49 : exception: snd_pcm_hw_params() failed: Invalid argument
Dec 30 08:49 : player: problems opening audio device while playing "NAS/Musikbank/The Waterboys (FLAC)/Fisherman's Blues/01 Fisherman's Blues.wma"
Dec 30 08:49 : exception: Failed to open "ALSA bluetooth" [alsa]
Dec 30 08:49 : exception: nested: Error opening ALSA device "btstream"
Dec 30 08:49 : exception: snd_pcm_hw_params() failed: Invalid argument
Dec 30 08:49 : exception: Failed to open "ALSA bluetooth" [alsa]
Dec 30 08:49 : exception: nested: Error opening ALSA device "btstream"
Dec 30 08:49 : exception: snd_pcm_hw_params() failed: Invalid argument
Dec 30 08:49 : exception: Failed to open "ALSA bluetooth" [alsa]
Dec 30 08:49 : exception: nested: Error opening ALSA device "btstream"
Dec 30 08:49 : exception: snd_pcm_hw_params() failed: Invalid argument
Dec 30 08:49 : exception: Failed to open "ALSA bluetooth" [alsa]
Dec 30 08:49 : exception: nested: Error opening ALSA device "btstream"
Dec 30 08:49 : exception: snd_pcm_hw_params() failed: Invalid argument


Could I ask if this is an issue with the BT driver or is there a solution/setting I can apply in Moode?
Reply
#7
(12-30-2018, 09:43 AM)Sniglar Wrote: I think I've just bumped into the same issue with WMA files over bluetooth (Pi0, Pimoroni pHatDAC and AKG C50BT headphones on Moode 4.4)

Everything works well through wired connection but Moode refuses to play WMA files over a bluetooth connection showing this error:

MPD error

Failed to open "ALSA bluetooth" [alsa]; Error opening ALSA device "btstream"; snd_pcm_hw_params() failed: Invalid argument

Both Mp3 and FLAC play fine over Moode via bluetooth

cat /var/log/mpd/log


Code:
Dec 30 08:49 : player: played "SDCARD/Linn Christmas 2015/07 - Sophisticated Lady.flac"
Dec 30 08:49 : exception: Failed to open "ALSA bluetooth" [alsa]
Dec 30 08:49 : exception: nested: Error opening ALSA device "btstream"
Dec 30 08:49 : exception: snd_pcm_hw_params() failed: Invalid argument
Dec 30 08:49 : exception: Failed to open "ALSA bluetooth" [alsa]
Dec 30 08:49 : exception: nested: Error opening ALSA device "btstream"
Dec 30 08:49 : exception: snd_pcm_hw_params() failed: Invalid argument
Dec 30 08:49 : player: problems opening audio device while playing "NAS/Musikbank/The Waterboys (FLAC)/Fisherman's Blues/01 Fisherman's Blues.wma"
Dec 30 08:49 : player: played "NAS/Musikbank/The Waterboys (FLAC)/Fisherman's Blues/01 Fisherman's Blues.wma"
Dec 30 08:49 : exception: Failed to open "ALSA bluetooth" [alsa]
Dec 30 08:49 : exception: nested: Error opening ALSA device "btstream"
Dec 30 08:49 : exception: snd_pcm_hw_params() failed: Invalid argument
Dec 30 08:49 : exception: Failed to open "ALSA bluetooth" [alsa]
Dec 30 08:49 : exception: nested: Error opening ALSA device "btstream"
Dec 30 08:49 : exception: snd_pcm_hw_params() failed: Invalid argument
Dec 30 08:49 : player: problems opening audio device while playing "NAS/Musikbank/The Waterboys (FLAC)/Fisherman's Blues/01 Fisherman's Blues.wma"
Dec 30 08:49 : exception: Failed to open "ALSA bluetooth" [alsa]
Dec 30 08:49 : exception: nested: Error opening ALSA device "btstream"
Dec 30 08:49 : exception: snd_pcm_hw_params() failed: Invalid argument
Dec 30 08:49 : exception: Failed to open "ALSA bluetooth" [alsa]
Dec 30 08:49 : exception: nested: Error opening ALSA device "btstream"
Dec 30 08:49 : exception: snd_pcm_hw_params() failed: Invalid argument
Dec 30 08:49 : exception: Failed to open "ALSA bluetooth" [alsa]
Dec 30 08:49 : exception: nested: Error opening ALSA device "btstream"
Dec 30 08:49 : exception: snd_pcm_hw_params() failed: Invalid argument
Dec 30 08:49 : exception: Failed to open "ALSA bluetooth" [alsa]
Dec 30 08:49 : exception: nested: Error opening ALSA device "btstream"
Dec 30 08:49 : exception: snd_pcm_hw_params() failed: Invalid argument


Could I ask if this is an issue with the BT driver or is there a solution/setting I can apply in Moode?

@Sniglar

I just downloaded a WMA file from the Web and played it over BT from my moOde r4.4 on RPi3B+ to a JBL Flip 2 BT speaker.

The trouble with generic designators "WMA" and "AAC" as designators is that they don't reveal enough about the file's content. (I'm ignoring the fact that this WMA file is actually contained in the Microsoft Advanced System Format (ASF)). Microsoft has four different WMA encoders, for example. 

Here's what "mediainfo" says about my WMA file


Code:
pi@moode:/media/KAR04 $ mediainfo BachCPE*
General
Complete name                            : BachCPE_SonataAmin_1.wma
Format                                   : Windows Media
File size                                : 596 KiB
Duration                                 : 2 min 27 s
Overall bit rate mode                    : Constant
Overall bit rate                         : 33.0 kb/s
Maximum Overall bit rate                 : 32.6 kb/s
Album                                    : Internet Samples
Track name                               : Sonata in aMinor
Track name/Position                      : 1
Performer                                : Samantha Moore
Encoded date                             : UTC 2004-05-12 11:13:13.921
Name                                     : Kent's test of the Name tag

Audio
ID                                       : 1
Format                                   : WMA
Format version                           : Version 2
Codec ID                                 : 161
Codec ID/Info                            : Windows Media Audio
Description of the codec                 : Windows Media Audio 9 -  32 kbps, 22 kHz, stereo 2-pass CBR
Duration                                 : 2 min 27 s
Bit rate mode                            : Constant
Bit rate                                 : 32.0 kb/s
Channel(s)                               : 2 channels
Sampling rate                            : 22.05 kHz
Bit depth                                : 16 bits
Stream size                              : 578 KiB (97%)
Language                                 : English (United States)


and here's the output from moOde's "Audio info" while playing this file:

Code:
Audio Information
INPUT PROCESSING
Source:     USB/KAR04/BachCPE_SonataAmin_1.wma
Encoded at:     VBR compression
Decoded to:     24 bit, 22.05 kHz, Stereo, 32 kbps
DSP OPERATIONS
Resampling:     n/a
Crossfeed:     n/a
Equalizer:     n/a
Crossfade:     n/a
Other:     n/a
Chip options:     none
Volume ctl:     Software (MPD 32-bit float with dither)
OUTPUT STREAM
Destination:     Bluetooth
Encoded at:     16 bit, 44.1 kHz, Stereo, 1.411 mbps
AUDIO DEVICE
Device:     On-board audio device
Chip:     Broadcom SoC
Interface:     SOC

Can you install mediainfo or some similar diagnostic tool and show us the output I showed for one of your WMA files which fails to play?

Regards,
Kent
Reply
#8
@TheOldPresbyope,

Here's the MediaInfo info for a track that wouldn't play:

Code:
Format                                   : Windows Media
File size                                : 5.91 MiB
Duration                                 : 4 min 16 s
Overall bit rate mode                    : Constant
Overall bit rate                         : 193 kb/s
Maximum Overall bit rate                 : 193 kb/s
Album                                    : What's Up? [UK CD Single]
Track name                               : What's Up?
Track name/Position                      : 1
Performer                                : 4 Non Blondes
Composer                                 : Linda Perry
Genre                                    : Pop
Recorded date                            : 1994
Encoded date                             : UTC 2010-09-10 11:29:27.218
PeakValue                                : 32673
AverageLevel                             : 6267
Provider                                 : AMG
WM/ProviderStyle                         : Pop/Rock
ID                                       : 1
Format                                   : WMA
Format version                           : Version 2
Codec ID                                 : 161
Codec ID/Info                            : Windows Media Audio
Description of the codec                 : Windows Media Audio 9.2 - 192 kbps, 44 kHz, stereo 1-pass CBR
Duration                                 : 4 min 16 s
Bit rate mode                            : Constant
Bit rate                                 : 192 kb/s
Channel(s)                               : 2 channels
Sampling rate                            : 44.1 kHz
Bit depth                                : 16 bits
Stream size                              : 5.88 MiB (99%)
Language                                 : English (United States)

I've had the same problem on the pi0/pHat dac combination running Moode 4.2 and a Pi 3B+/IQaudio PiDigiAMP+ running Moode 4.4 

Thanks for your interest in this issue

Regards

Steve
Reply
#9
(12-30-2018, 07:30 PM)Sniglar Wrote: ...
I've had the same problem on the pi0/pHat dac combination running Moode 4.2 and a Pi 3B+/IQaudio PiDigiAMP+ running Moode 4.4 

Thanks for your interest in this issue

Regards

Steve

Wait. We started talking about Bluetooth and now you're talking about i2s DACs. If you can't play these tracks via the DACs either then the problem would seem to lie upstream in MPD and its decoders.

I could conjecture about several possibilities based on that codec description ("Windows Media Audio 9.2 - 192 kbps, 44 kHz, stereo 1-pass CBR") but there's nothing like a test. Can you zip up one of your tracks and either put it somewhere like DropBox where I can access it or email it to me? Send me a PM on this forum either with the URL or a request of my email address.

Regards,
Kent
Reply
#10
@TheOldPresbyope PM sent

Regards

Steve
Reply


Forum Jump: