Code Monkey home page Code Monkey logo

Comments (10)

arkq avatar arkq commented on June 11, 2024

See this issue: #11

from bluez-alsa.

roizcorp avatar roizcorp commented on June 11, 2024

i execute the following command arecord -f dat -D bluealsa | aplay and it worked!!

Can't wait to make it an all-in-one hands free system for my car!

from bluez-alsa.

roizcorp avatar roizcorp commented on June 11, 2024

sorry for re-open this...I realize now that I'm stuck...
yes.. the arecord -f dat... works, but it will not share...the output alsa card should play mpd hi-fi music (that's why I chose alsa) AND the BT input...
Scenario: I drive my car with the lovely music I have in my car pi mpd, and the navigation app on the phone wants to inform me about something...I expect the sound channeled from the BT to kick in while the music is playing and say whatever it has to say.

I have this solution now with all male aux cable from my phone to my car pi but I would like to spare the cable and spare the static elecric sound from the phone whenever I do something with it or just charge it

I know you are not supposed to accept these kind of issues but will indeed help me to achieve the use case...

from bluez-alsa.

onli avatar onli commented on June 11, 2024

I think that is because mixing is not yet possible with bluealsa. See #12 (comment), I don't think that has changed yet, though I don't see an open issue for it.

from bluez-alsa.

roizcorp avatar roizcorp commented on June 11, 2024

I thought to overcome this by using alsa's dmix and the alsaequal

can you list how the bluealsa (device,plugin,card,subcard - god damn it ALSA!) would show in the configuration

from bluez-alsa.

arkq avatar arkq commented on June 11, 2024

from bluez-alsa.

roizcorp avatar roizcorp commented on June 11, 2024

if I understand the issue correctly (and will report back in case solved or different analysis), is that bluealsa consumes the default audio card and will not allow any other feed, and on the other hand if the default audio card is already used by other feed then bluealsa cannot share as quoted in one of your commend "resource is busy"

from bluez-alsa.

arkq avatar arkq commented on June 11, 2024

from bluez-alsa.

roizcorp avatar roizcorp commented on June 11, 2024

ok, so as much as I read in the Alsa documentation it gets worst...
I use a raspberry pi, which has a crappy sound card, that why I bought an external GPIO based sound card. I use MPD which allows me to specify which card to use. Every time the Pi starts the MPD kicks in and starts to play HiFi music (24/192). HiFi music is important to me and this is why I keep use Alsa rather than PulseAudio.

Now, this is a car based Pi, so I want that my navigation app in the phone will still be able to tell me stuff while I listen to the music. Currently I connect the phone into the soundcard's input but as a result I static noise from the phone as well.

So the idea is to connect the phone to the Pi via BT, and whenever it would have something to say I could hear it, this is why I need both BlueAlsa and MPD streaming music/sound in the same time.

configuration is as follows (specially made for the blueAlsa, I did not need to make one where only the MPD was in play):
define the default sound card in /etc/asound.conf
defaults.pcm.!card 1
defaults.ctl.!card 1

declare BlueAlsa's interface, device and profile
defaults.bluealsa.interface "hci0"
defaults.bluealsa.device "XX:XX:XX:XX:XX:XX"
defaults.bluealsa.profile "a2dp"

problems:

  1. even if BT is connected and phone plays music, I cannot hear anything unless I use the arecord -f dat -D bluealsa | aplay (ecasound command is correct but it does not gets to stream the music for some reason, all I get is the "Prepared")
  2. the solution in section 1 does not work if MPD already started to play music and by that made the device "busy", if MPD is stopped then this will work.

I need to maintain the HiFi music while allow the phone to kick in whenever it needs to say something.
Thanks

from bluez-alsa.

roizcorp avatar roizcorp commented on June 11, 2024

sorted it out with a physical mixer in the sound card, in order to maintain high fidelity.
MPD is playing via hifi card, bluealsa is playing via the pi's default audio card arecord -f dat -D bluealsa | aplay. then simply connecting physically between the pi lineout and the hifi card's input.

from bluez-alsa.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.