Linux bluetooth development
 help / color / mirror / Atom feed
* Crash in android/hal-sco.c
@ 2015-03-31 13:13 Prabhu Chawandi
  2015-03-31 15:06 ` Szymon Janc
  0 siblings, 1 reply; 3+ messages in thread
From: Prabhu Chawandi @ 2015-03-31 13:13 UTC (permalink / raw)
  To: linux-bluetooth

Hi,

  I was trying to do SCO read using haltest but I was getting FPERROR.

So further I went debug coredump


static ssize_t in_read(struct audio_stream_in *stream, void *buffer,
                                                                size_t bytes)
{
        struct sco_stream_in *in = (struct sco_stream_in *) stream;
#if ANDROID_VERSION >= PLATFORM_VER(5, 0, 0)
        size_t frame_size = audio_stream_in_frame_size(&in->stream);
#else
        size_t frame_size = audio_stream_frame_size(&stream->common);
#endif

        size_t frame_num = bytes / frame_size; ===> Floating point error.

        size_t input_frame_num = frame_num;


I am getting channel number as 1  from audio_channel_count_from_in_mask

which is reserved for future hence I am getting zero as return which
leading to the crash

manyThanks,
Prabhu

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-04-01  3:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-31 13:13 Crash in android/hal-sco.c Prabhu Chawandi
2015-03-31 15:06 ` Szymon Janc
2015-04-01  3:43   ` Prabhu Chawandi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox