summaryrefslogtreecommitdiffstats
path: root/audio_hw.c
diff options
context:
space:
mode:
Diffstat (limited to 'audio_hw.c')
-rw-r--r--audio_hw.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/audio_hw.c b/audio_hw.c
index 144706d..abe6b76 100644
--- a/audio_hw.c
+++ b/audio_hw.c
@@ -125,9 +125,17 @@ static int audio_hw_set_mode(struct audio_hw_device *dev, int mode)
device = (struct tinyalsa_audio_device *) dev;
- device->mode = mode;
+ if(mode != device->mode) {
+ device->mode = mode;
- // TODO: If mode changed, change routing
+ if(device->stream_out != NULL) {
+ audio_out_set_route(device->stream_out,
+ device->stream_out->device_current);
+ // TODO: audio_input_set_route
+ }
+ }
+
+ device->mode = mode;
return 0;
}