diff options
author | Thierry Bultel <thierry.bultel@iot.bzh> | 2018-08-31 13:53:47 +0200 |
---|---|---|
committer | Thierry Bultel <thierry.bultel@iot.bzh> | 2018-08-31 13:53:47 +0200 |
commit | 80deafbe1bfb87c3a5e9f547c9491afd210e736a (patch) | |
tree | 67f83684cf67268dcb65d8062280f848057a74c2 /plugins/alsa/alsa-softmixer.h | |
parent | ded8e37b50982677480869763f3573ff43858505 (diff) |
Added bluez sound playback support
This adds sound playback for incoming sound from
connected bluetooth devices.
In this version, the softmixer relies on a modified
bluez-alsa version (https://github.com/iotbzh/bluez-alsa),
that provides an ioplug PCM bluezalsa connection proxy.
The softmixer api has a new verb to dynamically set the
device to listen to:
afb-client-demo ws://localhost:1234/api?token=\uuid=123 smixer bluezalsa_dev '{"interface":"hci0", "device":"F6:32:15:2A:80:70", "profile":"a2dp"}'
In this way it is possible to switch from a bluezalsa audio source to
another without any further configuration.
For now, only interface hci0 is supported.
This commit also migrates the softmixer binding to API v3
Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
Diffstat (limited to 'plugins/alsa/alsa-softmixer.h')
-rw-r--r-- | plugins/alsa/alsa-softmixer.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/alsa/alsa-softmixer.h b/plugins/alsa/alsa-softmixer.h index 96df8f3..e7218bd 100644 --- a/plugins/alsa/alsa-softmixer.h +++ b/plugins/alsa/alsa-softmixer.h @@ -86,6 +86,7 @@ typedef struct { const char *cardid; const char *name; const char *longname; + const char *pcmplug_params; int device; int subdev; } AlsaDevInfoT; @@ -135,6 +136,8 @@ typedef struct { int tid; char* info; + + int nbPcmFds; struct pollfd pollFds[2]; sem_t sem; @@ -279,7 +282,7 @@ PUBLIC snd_ctl_elem_id_t *AlsaCtlGetNameElemId(SoftMixerT *mixer, AlsaSndCtlT *s PUBLIC snd_ctl_t *AlsaCtlOpenCtl(SoftMixerT *mixer, const char *cardid) ; PUBLIC int CtlElemIdGetLong(SoftMixerT *mixer, AlsaSndCtlT *sndcard, snd_ctl_elem_id_t *elemId, long *value) ; PUBLIC int CtlElemIdSetLong(SoftMixerT *mixer, AlsaSndCtlT *sndcard, snd_ctl_elem_id_t *elemId, long value) ; -PUBLIC snd_ctl_card_info_t *AlsaCtlGetInfo(SoftMixerT *mixer, const char *cardid) ; +PUBLIC snd_ctl_card_info_t *AlsaCtlGetCardInfo(SoftMixerT *mixer, const char *cardid) ; PUBLIC int AlsaCtlNumidSetLong(SoftMixerT *mixer, AlsaSndCtlT *sndcard, int numid, long value) ; PUBLIC int AlsaCtlNumidGetLong(SoftMixerT *mixer, AlsaSndCtlT *sndcard, int numid, long* value) ; PUBLIC int AlsaCtlNameSetLong(SoftMixerT *mixer, AlsaSndCtlT *sndcard, const char *ctlName, long value) ; |