Closed Bug 1063422 Opened 10 years ago Closed 6 years ago

after connecting BT, whenever music seeks, sound is chopping

Categories

(Firefox OS Graveyard :: AudioChannel, defect, P1)

ARM
Gonk (Firefox OS)
defect

Tracking

(tracking-b2g:+, b2g-v2.1 affected, b2g-v2.2 affected)

RESOLVED WONTFIX
tracking-b2g +
Tracking Status
b2g-v2.1 --- affected
b2g-v2.2 --- affected

People

(Reporter: soyeonahn69, Unassigned)

References

Details

(Whiteboard: [LibGLA,,QE2, A])

User Agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; .NET4.0C; Tablet PC 2.0; CNS_UA; AD_LOGON=4C47452E4E4554)

Steps to reproduce:

1. after connecting BT(bluetooth)
2. playing the music 
3. move music seek bar.



Actual results:

sound is chopping.

root cause >>>>


whenever music seeks, track is created every times because of calling of set() method in Audiotrack.cpp not calling method of pause and start in audio track.



Expected results:

In normal status of not chopping
Whiteboard: [LibGLA,,QE2, A]
What product do you see this in? Firefox? Firefox OS? Can you be more specific about the steps you're taking that show this problem?
Component: General → AudioChannel
Product: Core → Firefox OS
Version: 2.0 Branch → unspecified
looks similar case with case 1045489.
Flags: needinfo?(scheng)
similar cause with bug 1045489.
(In reply to Bobby Chien [:bchien] from comment #2)
> looks similar case with case 1045489.

Yes, looks similar. 

In current design, while user operate seek() function the codeced buffer will be flushed by MediaDecoderStateMachine. And then a new Audiostream will be created to new a AudioTrack instance through opensl NDK. 

And I need know which device I can duplicate to further clarify. In the mean time, maybe Soyeon can try the solution of bug 1045489.
Flags: needinfo?(scheng)
Hi, Soyeon

Is there the comment 4 any help for this issue?
Flags: needinfo?(soyeonahn69)
I think so. it seems like that.
please ,tell me the way to modify Threads.cpp
Flags: needinfo?(soyeonahn69) → needinfo?(scheng)
(In reply to soyeon from comment #6)
> I think so. it seems like that.
> please ,tell me the way to modify Threads.cpp

The code does not belong to gecko. It should be modified by OEM partner.
Flags: needinfo?(scheng)
Hi scheng.

First, FrameCount`s value is invalid.
v2.0 is always add flag(AUDIO_OUTPUT_FLAG_FAST) by Android OpenGLES. So AudioTrack count fast output`s framecount and remove flag(AUDIO_OUTPUT_FLAG_FAST) because OEM device don`t use fast output. 

We are planing to remove AUDIO_OUTPUT_FLAG_FAST before calculate framecount.
Thanks.

=====================================
// must be called with mLock held
status_t AudioTrack::createTrack_l(
        audio_stream_type_t streamType,
        uint32_t sampleRate,
        audio_format_t format,
        size_t frameCount,
        audio_output_flags_t flags,
        const sp<IMemory>& sharedBuffer,
        audio_io_handle_t output,
        size_t epoch)
{
....
    // remove AUDIO_OUTPUT_FLAG_FAST
    if( flags & AUDIO_OUTPUT_FLAG_FAST) {
        flags = (audio_output_flags_t) (flags & ~AUDIO_OUTPUT_FLAG_FAST);
        mFlags = flags;
        ALOGV("remove AUDIO_OUTPUT_FLAG_FAST");
    }

    // The client's AudioTrack buffer is divided into n parts for purpose of wakeup by server, where
    //  n = 1   fast track with single buffering; nBuffering is ignored
    //  n = 2   fast track with double buffering
    //  n = 2   normal track, no sample rate conversion
    //  n = 3   normal track, with sample rate conversion
    //          (pessimistic; some non-1:1 conversion ratios don't actually need triple-buffering)
    //  n > 3   very high latency or very small notification interval; nBuffering is ignored
    const uint32_t nBuffering = (sampleRate == afSampleRate) ? 2 : 3;
Confirmed issue.

--------

Gaia-Rev        1b231b87aad384842dfc79614b2a9ca68a4b4ff3
Gecko-Rev       https://hg.mozilla.org/releases/mozilla-b2g34_v2_1/rev/95fbd7635152
Build-ID        20141118161207
Version         34.0
Device-Name     flame
FW-Release      4.4.2
FW-Incremental  39
FW-Date         Thu Oct 16 18:19:14 CST 2014
Bootloader      L1TC00011880

aia-Rev        0da467aba9ecf354b905f9cc08dfa1a4169659e4
Gecko-Rev       https://hg.mozilla.org/mozilla-central/rev/4dfa1b35a203
Build-ID        20141118160205
Version         36.0a1
Device-Name     flame
FW-Release      4.4.2
FW-Incremental  39
FW-Date         Thu Oct 16 18:19:14 CST 2014
Bootloader      L1TC00011880
Status: UNCONFIRMED → NEW
blocking-b2g: --- → 2.2?
Ever confirmed: true
OS: Windows 7 → Gonk (Firefox OS)
Priority: -- → P1
Hardware: x86 → ARM
Depends on: 1045489
Not sure this is related to bug 978649. Big buffer size could cause audio chopping (not just on Bluetooth). we need to dig problem for more resolution.
blocking-b2g: 2.2? → ---
tracking-b2g: --- → +
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.