From 6272788e3058aa548fdbf308a60e20c67152097d Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Wed, 18 Feb 2009 20:50:46 +0200 Subject: Add BT_PCM_FLAG_PCM_ROUTING flag to ipc --- audio/headset.c | 5 +++++ audio/headset.h | 1 + audio/ipc.h | 3 ++- audio/unix.c | 2 ++ 4 files changed, 10 insertions(+), 1 deletion(-) (limited to 'audio') diff --git a/audio/headset.c b/audio/headset.c index 54e4da29..9fdabe4c 100644 --- a/audio/headset.c +++ b/audio/headset.c @@ -2509,6 +2509,11 @@ gboolean headset_get_nrec(struct audio_device *dev) return hs->nrec; } +gboolean headset_get_sco_hci(struct audio_device *dev) +{ + return sco_hci; +} + int telephony_event_ind(int index) { if (!active_devices) diff --git a/audio/headset.h b/audio/headset.h index 97076151..0c9eb669 100644 --- a/audio/headset.h +++ b/audio/headset.h @@ -80,6 +80,7 @@ int headset_get_channel(struct audio_device *dev); int headset_get_sco_fd(struct audio_device *dev); gboolean headset_get_nrec(struct audio_device *dev); +gboolean headset_get_sco_hci(struct audio_device *dev); gboolean headset_is_active(struct audio_device *dev); diff --git a/audio/ipc.h b/audio/ipc.h index 9a2d93aa..ff35376a 100644 --- a/audio/ipc.h +++ b/audio/ipc.h @@ -160,7 +160,8 @@ struct bt_get_capabilities_req { #define BT_HFP_CODEC_PCM 0x00 -#define BT_PCM_FLAG_NREC 1 +#define BT_PCM_FLAG_NREC 0x01 +#define BT_PCM_FLAG_PCM_ROUTING 0x02 typedef struct { uint8_t transport; diff --git a/audio/unix.c b/audio/unix.c index 7fc4387f..a39f1806 100644 --- a/audio/unix.c +++ b/audio/unix.c @@ -250,6 +250,8 @@ static void headset_discovery_complete(struct audio_device *dev, void *user_data pcm->sampling_rate = 8000; if (headset_get_nrec(dev)) pcm->flags |= BT_PCM_FLAG_NREC; + if (!headset_get_sco_hci(dev)) + pcm->flags |= BT_PCM_FLAG_PCM_ROUTING; rsp->h.type = BT_RESPONSE; rsp->h.name = BT_GET_CAPABILITIES; -- cgit