summaryrefslogtreecommitdiffstats
path: root/audio/unix.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2007-06-22 20:58:12 +0000
committerLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2007-06-22 20:58:12 +0000
commit22dd53fe6ef9783c3357a6da1ecedd3b01bb7003 (patch)
tree2246d1d9f6b024ef0eb713df605f52ed3e0530ef /audio/unix.c
parent8636ace20adebe32149851cf068bf4b0ecb224ee (diff)
Update build to make use of newly create files.
Diffstat (limited to 'audio/unix.c')
-rw-r--r--audio/unix.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/audio/unix.c b/audio/unix.c
index 2dad00df..f17404b4 100644
--- a/audio/unix.c
+++ b/audio/unix.c
@@ -78,6 +78,7 @@ static int unix_sendmsg_fd(int sock, int fd, struct ipc_packet *pkt)
static gboolean unix_event(GIOChannel *chan, GIOCondition cond, gpointer data)
{
+ struct device *device;
struct sockaddr_un addr;
socklen_t addrlen;
struct ipc_packet *pkt;
@@ -118,9 +119,13 @@ static gboolean unix_event(GIOChannel *chan, GIOCondition cond, gpointer data)
cfg = (struct ipc_data_cfg *) pkt->data;
memset(cfg, 0, sizeof(struct ipc_data_cfg));
- if (manager_get_device(clisk, pkt->role, cfg) == 0)
- unix_send_cfg(clisk, pkt);
+ if ((device = manager_default_device())) {
+ if (device->headset)
+ headset_get_config(device, clisk, pkt);
+ }
+ if (cfg->fd != 0)
+ unix_send_cfg(clisk, pkt);
break;
case PKT_TYPE_STATUS_REQ:
info("Package PKT_TYPE_STATUS_REQ");