diff options
Diffstat (limited to 'cras/src/server/audio_thread.c')
-rw-r--r-- | cras/src/server/audio_thread.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/cras/src/server/audio_thread.c b/cras/src/server/audio_thread.c index df713ca5..cd155e82 100644 --- a/cras/src/server/audio_thread.c +++ b/cras/src/server/audio_thread.c @@ -555,8 +555,11 @@ static void append_stream_dump_info(struct audio_debug_info *info, si->runtime_nsec = time_since.tv_nsec; } -/* Handle a message sent to the playback thread */ -static int handle_playback_thread_message(struct audio_thread *thread) +/* Handle a message sent from main thread to the audio thread. + * Returns: + * Error code when reading or sending message fails. + */ +static int handle_audio_thread_message(struct audio_thread *thread) { uint8_t buf[256]; struct audio_thread_msg *msg = (struct audio_thread_msg *)buf; @@ -711,7 +714,7 @@ static int handle_playback_thread_message(struct audio_thread *thread) err = audio_thread_send_response(thread, ret); if (err < 0) return err; - return ret; + return 0; } /* Returns the number of active streams plus the number of active devices. */ @@ -912,7 +915,7 @@ static void *audio_io_thread(void *arg) continue; if (thread->pollfds[0].revents & POLLIN) { - rc = handle_playback_thread_message(thread); + rc = handle_audio_thread_message(thread); if (rc < 0) syslog(LOG_ERR, "handle message %d", rc); } |