diff options
author | Daniel Hillenbrand <daniel.hillenbrand@codeworkx.de> | 2012-07-26 02:32:38 +0200 |
---|---|---|
committer | Daniel Hillenbrand <daniel.hillenbrand@codeworkx.de> | 2012-07-26 02:32:38 +0200 |
commit | 545adfb6077d754aec40e2e913655f4bd56e35da (patch) | |
tree | b14b8353ab7330d5a84a3034d66b93dca23dbe77 /audio | |
parent | fe53effb06fac167dd734f05f57729c64f197132 (diff) | |
download | device_samsung_p3100-545adfb6077d754aec40e2e913655f4bd56e35da.zip device_samsung_p3100-545adfb6077d754aec40e2e913655f4bd56e35da.tar.gz device_samsung_p3100-545adfb6077d754aec40e2e913655f4bd56e35da.tar.bz2 |
audio: request 2 input channels by default
Diffstat (limited to 'audio')
-rwxr-xr-x | audio/audio_hw.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/audio/audio_hw.c b/audio/audio_hw.c index 8e26217..e861fc6 100755 --- a/audio/audio_hw.c +++ b/audio/audio_hw.c @@ -1407,7 +1407,7 @@ static uint32_t in_get_channels(const struct audio_stream *stream) { struct espresso_stream_in *in = (struct espresso_stream_in *)stream; - return in->main_channels; + return AUDIO_CHANNEL_IN_STEREO; } static audio_format_t in_get_format(const struct audio_stream *stream) @@ -2569,6 +2569,13 @@ static int adev_open_input_stream(struct audio_hw_device *dev, struct espresso_audio_device *ladev = (struct espresso_audio_device *)dev; struct espresso_stream_in *in; int ret; + + /* Respond with a request for stereo if a different format is given. */ + if (config->channel_mask != AUDIO_CHANNEL_IN_STEREO) { + config->channel_mask = AUDIO_CHANNEL_IN_STEREO; + return -EINVAL; + } + int channel_count = popcount(config->channel_mask); *stream_in = NULL; |