Comments (14)
Hi,
Is there a way to automatically connect to any address?
Currently it is not possible. It has crossed my mind, though :) It will be possible (in the future) for sure, with the bluealsa-aplay.
Is there any way for the volume to be adjusted via the phone/tablet?
To be honest, I don't know (I'm not able to check it right now). I think, that it should be possible. If not via the bluealsa itself, it could be done via some scripting. It is possible, that upon connecting BT device, BlueZ registers new input device (if BT device supports such a feature), which could be used to control volume.
EDIT:
With a little bit of hacking, you could try to listen for a D-Bus signal indicating device connection (A2DP connection establishment, to be exact), which could trigger aplay setup. It might be a little bit of scripting, however it could be possible.
from bluez-alsa.
Rats! Would have been perfect solution and finally rid of pa which eats 32% of my resources. I imagine a lot of the RPI people would like this feature too.
from bluez-alsa.
Checkout fresh master snapshot. If you are lucky (your phone/tablet is correctly recognized by the BlueZ) you should be able to control volume.
from bluez-alsa.
Just on the DBus monitoring idea, do you have the DBus interface address org.x.x ?
Any additional information of the specifics of listening for the A2DP connection establishment?
from bluez-alsa.
You can, the name is org.bluez
then you have several options. Either watch for new devices with interface org.bluez.Device1
or proxy org.freedesktop.DBus.ObjectManager
on path /
and listen to the InterfaceAdded
signal. Gio (GLib) has nice high level classes for this which we use in blueman.
Then inspect the UUIDs
property on interface org.bluez.Device1
and look for the uuid that corresponds to A2DP.
from bluez-alsa.
Yea, could add that to simple-agent and run bluealsa-play with the appropriate connected mac perhaps.
from bluez-alsa.
simple-agent
is bluez4 and replaced with bluetoothctl
in version 5.
If you are up for some hacking, you could create your own agent and have it handle pin codes for a select set of macs. For inspiration look https://github.com/blueman-project/blueman/blob/master/blueman/main/applet/BluezAgent.py but skip making it the default.
from bluez-alsa.
Bluez5-5.43 is shipped with simple-agent and works well with pulseaudio. On my embedded Linux I can automatically pair, trust ( I pin functionality added ) any mobile / tablet and play music exactly like an off-the-shelf BT speaker does with no user intervention speaker side. My issues are pulse eats 32% of my resources and pulse also plays games with my other music renders that need non-pcm access to the sound card, hence why blue-alsa is great.
Look at this all last night I'm wondering if it's going to be possible to do the same with blue-alsa?
For example, blue-alsa needs a hci0 mac in order to start, For a BT a2dp device to show on my iphone I need bluetoothd, blue-alsa and a python agent. A chicken-n-egg situation, blue-alsa needs a hci0 mac to start and tell bluez its capabilities BUT I need to be able to change the mac to the current connected device automatically to play music.
@infirit, my set-up already does this, I can see all the trust devices within the BT directories in my file system ( with PA ). My problem is changing blue-alsa's mac on the fly with one of those stored and still keeping blue-alsa alive so a phone/tablet can see an a2dp device in the first place. Hope this makes sense?
from bluez-alsa.
@George-ou812 You do not have to kill/restart bluealsa server, in fact it is not advised. The only thing you have to do, it is to start bluealsa-aplay (or arecord|aplay) with a correct MAC address.
from bluez-alsa.
Yea, that's the problem! Passing the mac to bluealsa without human intervention...
If I start bluealsa my phone will find an a2dp device, connect and render via arecord. If I pair another phone I have to change the HCI device in asound.conf by hand otherwide it complains about no transport.
from bluez-alsa.
Bluez5-5.43 is shipped with simple-agent
Oh, you're right, I thought they dropped it.
Maybe you can post the asoundrc content and what you change and related error messages.
from bluez-alsa.
Latest master build has fixed the volume on iphone4! I'll investigate using bluealsa-aplay and see if I can associate a mac dynamically somehow after connection but before "play". Does bluealsa-aplay actually render directly to hardware or has it just hidden "arecord | aplay" internally?
from bluez-alsa.
Yes, bluealsa-aplay omits unnecessary calls to the bluealsa PCM plugin. It reads audio directly from the bluealsa server and writes it to the PCM output device.
from bluez-alsa.
Excellent! Great job. This issue's done for me now. Thanks.
from bluez-alsa.
Related Issues (20)
- airpods3 failed to connect back HOT 3
- Fail to use google home mini as bluetooth speaker HOT 5
- Illegal Instruction on PiZero HOT 9
- No such device (Bluetooth, IPhone) HOT 2
- Couldn't acquire D-Bus name. HOT 12
- connected airpods pro2, the music is played without sound HOT 5
- [RTL8822CE] SCO with msbc codec enabled requires source code patching to deliver audio to headset HOT 4
- ofono not working anymore HOT 11
- API doc out of date HOT 1
- changing a2dp codec broken HOT 4
- Build error undefined references HOT 3
- Cannot decode mSBC with Realtek USB adapter HOT 1
- LDAC problem after update from 4.0 to 4.1.1 HOT 8
- v4.1.1 fails to build on on Debian buster i386 HOT 8
- No sound from Onkyo receiver HOT 90
- Potential server lockup in PCM drain HOT 2
- Sink producing no audio with aptX codec HOT 2
- allow build with different dbus name HOT 2
- Bluealsa with Google Pixel 8 Android Version 14 (Call sounds like a robot) HOT 9
- Fedora includes a fork of libopenaptx, libfreeaptx HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bluez-alsa.