summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2009-02-18 20:50:46 +0200
committerJohan Hedberg <johan.hedberg@nokia.com>2009-02-18 20:50:46 +0200
commit6272788e3058aa548fdbf308a60e20c67152097d (patch)
tree6c66dcbc2e0c54bd2d6e67f51594d6ea970b40a4 /audio
parent24df1ac4425546469aeacd6d2dd69b513c77e6a2 (diff)
Add BT_PCM_FLAG_PCM_ROUTING flag to ipc
Diffstat (limited to 'audio')
-rw-r--r--audio/headset.c5
-rw-r--r--audio/headset.h1
-rw-r--r--audio/ipc.h3
-rw-r--r--audio/unix.c2
4 files changed, 10 insertions, 1 deletions
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;