Moode Forum

Full Version: m4a playback
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I set up Moode on my raspberry pi 3 and connected my Mpow d7 bluetooth headphones through Moode's bluetooth interface.

I can play radio stations and mp3 music files with no problem. Sounds great.

At this point, I am just using the Raspberry PI's inbuilt sound system, no DAC, etc.

But, I get the following error when I try to play an m4a file:

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

I have researched the Web but cannot find a solution. I assume there is a configuration setting I am missing?
(03-16-2019, 06:27 PM)jgee@vsgpartners.com Wrote: [ -> ]I set up Moode on my raspberry pi 3 and connected my Mpow d7 bluetooth headphones through Moode's bluetooth interface.

I can play radio stations and mp3 music files with no problem. Sounds great.

At this point, I am just using the Raspberry PI's inbuilt sound system, no DAC, etc.

But, I get the following error when I try to play an m4a file:

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

I have researched the Web but cannot find a solution. I assume there is a configuration setting I am missing?

@"jgee@vsgpartners.com"

I'm away from my home at the moment so can't test this.

I seem to remember running into something like this before. IIRC, my workaround was to go to MPD Config and enable SoX Resampling with a Sampling rate such as 16 bit/* kHz or 24 bit/* kHz.

See if that helps.

Regards,
Kent
(03-16-2019, 06:52 PM)j gee@vsgpartners.com Wrote: [ -> ][quote pid='8832' dateline='1552760845']
I set up Moode on my raspberry pi 3 and connected my Mpow d7 bluetooth headphones through Moode's bluetooth interface.

I can play radio stations and mp3 music files with no problem. Sounds great.

At this point, I am just using the Raspberry PI's inbuilt sound system, no DAC, etc.

But, I get the following error when I try to play an m4a file:

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

I have researched the Web but cannot find a solution. I assume there is a configuration setting I am missing?

[/quote]

I figured out the problem. I needed to add format "44100:16:2"  to my mpd.conf. M4A files playing fine now.
Hi,

To which audio output did you add the format statement?

Maybe this should be a config setting.
I regained my memory...http://moodeaudio.org/forum/showthread.p...17#pid6917

There it was certain .wma files in question, which by definition are WMA encoded; here it's .m4a, which really means AAC-encoded. In both cases we don't know what the encoding parameters were.

I've already confessed that the internal audio processing involved in MPD decoders, ALSA, and bluez-alsa is murky to me, but I remember something @borine said in our github bluez-alsa discussion:


Quote:Bluealsa only accepts pcm streams sampled at 48kHz. If the application configures the alsa device with any other sample rate then by default alsa invokes its own internal resampler - meaning that the application is actually interacting with the resampler and not directly with bluealsa.
 
This implies to me that explicitly defining "44100:16:2" does just this. Hence, do my hack and this hack accomplish the same goal in different ways?
Regards,
Kent
(03-17-2019, 11:36 AM)Tim Curtis Wrote: [ -> ]Hi,

To which audio output did you add the format statement?

Maybe this should be a config setting.

audio_output {
type "alsa"
name "ALSA bluetooth"
device "btstream"
mixer_type "software"
format "44100:16:2"
}