Audio passthrough: call audio_has_proportional_frames() for IEC61937
Bug: 24541671 Bug: 20891646 Bug: 26373761 Change-Id: I44351cfb7cfae16e6b3500add727a2c41b0f4e81 Signed-off-by: Phil Burk <philburk@google.com>
This commit is contained in:
@@ -462,7 +462,7 @@ static inline size_t audio_stream_frame_size(const struct audio_stream *s)
|
||||
size_t chan_samp_sz;
|
||||
audio_format_t format = s->get_format(s);
|
||||
|
||||
if (audio_is_linear_pcm(format)) {
|
||||
if (audio_has_proportional_frames(format)) {
|
||||
chan_samp_sz = audio_bytes_per_sample(format);
|
||||
return popcount(s->get_channels(s)) * chan_samp_sz;
|
||||
}
|
||||
@@ -478,7 +478,7 @@ static inline size_t audio_stream_out_frame_size(const struct audio_stream_out *
|
||||
size_t chan_samp_sz;
|
||||
audio_format_t format = s->common.get_format(&s->common);
|
||||
|
||||
if (audio_is_linear_pcm(format)) {
|
||||
if (audio_has_proportional_frames(format)) {
|
||||
chan_samp_sz = audio_bytes_per_sample(format);
|
||||
return audio_channel_count_from_out_mask(s->common.get_channels(&s->common)) * chan_samp_sz;
|
||||
}
|
||||
@@ -494,7 +494,7 @@ static inline size_t audio_stream_in_frame_size(const struct audio_stream_in *s)
|
||||
size_t chan_samp_sz;
|
||||
audio_format_t format = s->common.get_format(&s->common);
|
||||
|
||||
if (audio_is_linear_pcm(format)) {
|
||||
if (audio_has_proportional_frames(format)) {
|
||||
chan_samp_sz = audio_bytes_per_sample(format);
|
||||
return audio_channel_count_from_in_mask(s->common.get_channels(&s->common)) * chan_samp_sz;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user