mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-07 13:30:03 -05:00
add noop implementation of standby/resume ESOUND commands
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@230 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
df953a11c9
commit
3e1bdacd4f
2 changed files with 12 additions and 3 deletions
|
|
@ -22,7 +22,7 @@
|
||||||
VERSION_STRING="@PACKAGE_NAME@ esd wrapper @PACKAGE_VERSION@"
|
VERSION_STRING="@PACKAGE_NAME@ esd wrapper @PACKAGE_VERSION@"
|
||||||
|
|
||||||
fail() {
|
fail() {
|
||||||
echo "$1" > /dev/stderr
|
echo "ERROR: $1"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -122,6 +122,7 @@ static int esd_proto_stream_pan(struct connection *c, esd_proto_t request, const
|
||||||
static int esd_proto_sample_cache(struct connection *c, esd_proto_t request, const void *data, size_t length);
|
static int esd_proto_sample_cache(struct connection *c, esd_proto_t request, const void *data, size_t length);
|
||||||
static int esd_proto_sample_free_or_play(struct connection *c, esd_proto_t request, const void *data, size_t length);
|
static int esd_proto_sample_free_or_play(struct connection *c, esd_proto_t request, const void *data, size_t length);
|
||||||
static int esd_proto_sample_get_id(struct connection *c, esd_proto_t request, const void *data, size_t length);
|
static int esd_proto_sample_get_id(struct connection *c, esd_proto_t request, const void *data, size_t length);
|
||||||
|
static int esd_proto_noop(struct connection *c, esd_proto_t request, const void *data, size_t length);
|
||||||
|
|
||||||
/* the big map of protocol handler info */
|
/* the big map of protocol handler info */
|
||||||
static struct proto_handler proto_map[ESD_PROTO_MAX] = {
|
static struct proto_handler proto_map[ESD_PROTO_MAX] = {
|
||||||
|
|
@ -140,8 +141,8 @@ static struct proto_handler proto_map[ESD_PROTO_MAX] = {
|
||||||
{ sizeof(int), NULL, "sample stop" },
|
{ sizeof(int), NULL, "sample stop" },
|
||||||
{ -1, NULL, "TODO: sample kill" },
|
{ -1, NULL, "TODO: sample kill" },
|
||||||
|
|
||||||
{ ESD_KEY_LEN + sizeof(int), NULL, "standby" },
|
{ ESD_KEY_LEN + sizeof(int), esd_proto_noop, "standby" }, /* NOOP! */
|
||||||
{ ESD_KEY_LEN + sizeof(int), NULL, "resume" },
|
{ ESD_KEY_LEN + sizeof(int), esd_proto_noop, "resume" }, /* NOOP! */
|
||||||
|
|
||||||
{ ESD_NAME_MAX, esd_proto_sample_get_id, "sample getid" },
|
{ ESD_NAME_MAX, esd_proto_sample_get_id, "sample getid" },
|
||||||
{ ESD_NAME_MAX + 2 * sizeof(int), NULL, "stream filter" },
|
{ ESD_NAME_MAX + 2 * sizeof(int), NULL, "stream filter" },
|
||||||
|
|
@ -654,6 +655,14 @@ static int esd_proto_sample_free_or_play(struct connection *c, esd_proto_t reque
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int esd_proto_noop(struct connection *c, esd_proto_t request, const void *data, size_t length) {
|
||||||
|
int *ok;
|
||||||
|
ok = connection_write(c, sizeof(int));
|
||||||
|
assert(ok);
|
||||||
|
*ok = 1;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/*** client callbacks ***/
|
/*** client callbacks ***/
|
||||||
|
|
||||||
static void client_kill_cb(struct pa_client *c) {
|
static void client_kill_cb(struct pa_client *c) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue