Thank you for your donation!


Solved: No sound on usb dac when using bluetooth/airplay
#1
Hi.

Need some help figuring this out...

Need moOde on my pi zero w to be able to play through bluetooth/airplay to my Chord Mojo.

I can connect with bluetooth and airplay fine and play audio if the onboard audio card is selected. If I select the USB output (the Mojo) then it disconnects bluetooth and will no longer pair (same with airplay).

I have no problem with the Mojo connected and playing webradio from the webinterface through moOde (sounds fine on the Mojo), but if I use bluetooth or airplay then nothing happens (other than the phone will disconnect when the usb is selected as output).

Any ideas?

Using latest version 4.3 2018-09-27. 



Code:
 usb 1-1: new high-speed USB device number 3 using dwc_otg
 usb 1-1: New USB device found, idVendor=245f, idProduct=0815
 usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
 usb 1-1: Product: Mojo
 usb 1-1: SerialNumber: 413-001
 usb 1-1: Warning! Unlikely big volume range (=32767), cval->res is probably wrong.
 usb 1-1: [10] FU [PCM Playback Volume] ch = 2, val = -32767/0/1
 usb 1-1: Warning! Unlikely big volume range (=32767), cval->res is probably wrong.
 usb 1-1: [10] FU [PCM Playback Volume] ch = 1, val = -32767/0/1




Code:
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
  Subdevices: 7/7
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Mojo [Mojo], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Code:
pi@moode:~ $ lsusb
Bus 001 Device 004: ID 245f:0815
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Reply
#2
Are you trying to switch on-the-fly between on-board audio and USB audio device?
Enjoy the Music!
moodeaudio.org | Twitter Feed | Git Repo
Reply
#3
(11-04-2018, 10:35 PM)Tim Curtis Wrote: Are you trying to switch on-the-fly between on-board audio and USB audio device?

No. Just tried it out as part of testing. 

When the Mojo is connected I can get it to play radio stations/local media fine through the external dac, but trying to stream to it through bluetooth/airplay doesn't work (it connects for a second - without sound - and then disconnects).

If I reboot and don't connect the usb dac then it plays fine with bluetooth (through the onboard audio). However I will never use the onboard audio (it's only to be used with the usb dac).
Reply
#4
When playing a radio station or local file, post a screen shot of the Audio info screen. I'm interested in seeing what bit depth is being sent to the Mojo.
Enjoy the Music!
moodeaudio.org | Twitter Feed | Git Repo
Reply
#5
(11-04-2018, 10:55 PM)Tim Curtis Wrote: When playing a radio station or local file, post a screen shot of the Audio info screen. I'm interested in seeing what bit depth is being sent to the Mojo.

Code:
Audio Information
INPUT PROCESSING
Source:     http://listen.sub.fm/hi/;&type=mp3
Encoded at:     VBR compression
Decoded to:     24 bit, 44.1 kHz, Stereo, 192 kbps
DSP OPERATIONS
Resampling:     off
Crossfeed:     off
Equalizer:     Graphic EQ: (off), Parametric EQ: (off}
Crossfade:     0 seconds
Other:     Volume normalize (no}, Replaygain (off)
Chip options:     none
Volume ctl:     Disabled (100% volume level is output by MPD)
OUTPUT STREAM
Destination:     Local
Encoded at:     32 bit, 44.1 kHz, Stereo, 2.822 mbps
AUDIO DEVICE
Device:     
Chip:     
Interface:
   
   
Reply
#6
It looks like Mojo wants 32 bit samples. This is not uncommon for DAC's based on high-speed UAC2 chipsets for example XMOS.

You can set Airplay to output 32 bit in the Airplay config screen.

Bluetooth however does not have a "bit-depth" setting in the UI but you could try editing the file below and change S16_LE to S32_LE. If this works then I can add a setting to the UI.

/usr/share/alsa/alsa.conf.d/20-bluealsa-dmix.conf

-Tim
Enjoy the Music!
moodeaudio.org | Twitter Feed | Git Repo
Reply
#7
Nice - that did the trick. Thanks! It now fully works with both Airplay, Spotify (after recompile as instructed in another post) and with Bluetooth.

However one small thing with Bluetooth (and don't know why this changed). To get it to connect I need to manually choose "connect" from the webinterface. Choosing connect from the phone (iPhone) will not make a connection (it fails after trying for a few seconds). Connecting from the webinterface works fine and it can then play through the Mojo.

It's actually the same thing as described here: http://moodeaudio.org/forum/showthread.p...=bluetooth (not the 3 second thing, but the "reverse connection")
What can be the reason for that?

Edit: 
And to answer that - it was because the bluetooth device wasn't trusted when added.
That also showed up in the log.

Code:
moode bluetoothd[794]: Authentication attempt without agent
moode bluetoothd[794]: Access denied: org.bluez.Error.Rejected


Adding the address as trusted with bluetoothctl makes it possible to connect from the phone.

Now I think the final thing is getting the pi to automatically do bluetooth connect during "power on" would make it complete (though this might not always be wanted behaviour).
Reply
#8
Cool.

What type of recompile did you you perform with Spotify?

I forgot to mention in my earlier post that the "Speaker sharing" setting has to be ON for the Bluetooth hack to work but you must have already had it ON.

Thats odd regarding the connection failure. I have iPhone and iPad and no issues. I start the SCAN running in moOde BlueZ config, then I connect right when the SCAN finishes. My iPad is a bit picky about connecting. My iPhone always connects first time.

-Tim
Enjoy the Music!
moodeaudio.org | Twitter Feed | Git Repo
Reply
#9
I needed to do this for Spotify to work: http://moodeaudio.org/forum/showthread.php?tid=625

Not sure about the Speaker Sharing, but I might have had it on (just took the thing apart as I'm constructing a case for it). I will do some more testing with the Bluetooth pairing later.
Reply
#10
Just reporting back that after a day of testing everything works 100% with the Mojo as a DAC (bluetooth, spotify and airplay). 

I was strongly considering buying the Chord Poly, but this now does everything and more.

Donation coming soon. :-)

Pictures: http://moodeaudio.org/forum/showthread.php?tid=656
Reply


Forum Jump: