diff options
author | Jean-Michel Trivi <jmtrivi@google.com> | 2011-06-28 16:21:22 -0700 |
---|---|---|
committer | Jean-Michel Trivi <jmtrivi@google.com> | 2011-06-28 16:55:27 -0700 |
commit | 58dbfbc036ec427d4c430ff0aed28ae68c8f806c (patch) | |
tree | 3b48cc66eda2bfade5201f32ac8c8f7f7897fb47 /audio | |
parent | 9c00a24a5b2b4e35f86296bd85ff054ab51ba579 (diff) | |
download | device_samsung_tuna-58dbfbc036ec427d4c430ff0aed28ae68c8f806c.zip device_samsung_tuna-58dbfbc036ec427d4c430ff0aed28ae68c8f806c.tar.gz device_samsung_tuna-58dbfbc036ec427d4c430ff0aed28ae68c8f806c.tar.bz2 |
Fix audio output to play audio other than 44k stereo
When opening an output stream, the driver needs to return its
format, sample rate and channel mask. Failure to do so will
cause AudioFlinger to create the ouput as DIRECT, regardless of
the output flags.
The consequence of the output thread being in DIRECT mode is
that no mixing is done (one sound at a time), and only audio
that plays at the HAL's expected audio characteristics (44k
16bit stereo) can be played.
The fix consists in returning the format, chanel mask and sample
rate values when opening the output stream.
Change-Id: Ib26e3337fe199efdba7a70b40df93518aceec04a
Diffstat (limited to 'audio')
-rw-r--r-- | audio/audio_hw.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/audio/audio_hw.c b/audio/audio_hw.c index bc4ff1a..c9d5018 100644 --- a/audio/audio_hw.c +++ b/audio/audio_hw.c @@ -746,6 +746,10 @@ static int adev_open_output_stream(struct audio_hw_device *dev, out->dev = ladev; + *format = out_get_format(&out->stream.common); + *channels = out_get_channels(&out->stream.common); + *sample_rate = out_get_sample_rate(&out->stream.common); + *stream_out = &out->stream; return 0; |