diff options
author | Luiz Augusto von Dentz <luiz.dentz@openbossa.org> | 2007-06-06 17:58:19 +0000 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.dentz@openbossa.org> | 2007-06-06 17:58:19 +0000 |
commit | f1a8e719f5687bb32f2f5ed59f26a3203ad43efb (patch) | |
tree | 8771c939ccaa33d02a98ef2689217a1fad5a20d9 /audio/headset.c | |
parent | e47ffdb86e691d7418c0e5a2bebbdd7c512aa50f (diff) |
Some fixes for audio code prototype.
Diffstat (limited to 'audio/headset.c')
-rw-r--r-- | audio/headset.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/audio/headset.c b/audio/headset.c index 2fb139ad..109e7c5d 100644 --- a/audio/headset.c +++ b/audio/headset.c @@ -1817,3 +1817,20 @@ void headset_exit(void) dbus_connection_unref(connection); connection = NULL; } + +int headset_get_config(headset_t *headset, struct ipc_data_cfg *cfg) +{ + if (headset->sco == NULL) + return -1; + + cfg->fd = g_io_channel_unix_get_fd(headset->sco); + cfg->fd_opt = CFG_FD_OPT_READWRITE; + cfg->encoding = 0; + cfg->bitpool = 0; + cfg->channels = 1; + cfg->pkt_len = 48; + cfg->sample_size = 2; + cfg->rate = 8000; + + return 0; +} |