Nokia submits this code under the terms of a commercial contribution agreement
with RealNetworks, and I am authorized to contribute this code under said
agreement."
Modified by: [email protected]
Reviewed by: Rathinasamy Rajesh; Amick Patrick;
TSW Id: ESLM-83PVBW
Date: 05/05/2010
Project: SymbianMmf_wm
Synopsis: Music player is crash when refreshing and playing a high bitrate wma
song
Overview: The wma file is WMA9 lossless(format tag 0x163). This format is not
supported by decoder. However a crash is seen during initialization. This crash
is seen only in DSP codec. Devsound initialization is asynchronous call. In
MDFDevSound::Open(), asynchronous request for devsound initialization is made
and then hardware configuration is set via LoadCustomInterfaces() by calling
HXMDFDevConfWMA::SetHwDevCIs(). SetHwDevCIs configuration fails because
CWmaDecoderIntfc::ApplyConfig() returns error as KErrArgument (-6). This error
is neglected in the MDFDevSound::Open(). After sometime devsound initialization
completes and when tried to set config crash occurs. Since SetHwDevCIs() has
failed, request for devsound initialization should be cancelled.
Fix: 1. Pending Devsound initialization can be cancelled by calling
CMMFDevSound::CancelInitialize(). Added this API in CHXMMFDevSound.
2. With first change another crash is seen in
HXClientPropWatch::PropWatchResponse::DeletedProp(). This is because property
"MMF.SecureOutput" added in CHXMDFAudioDevice::Open() was not cleared when
devsound initialization had failed. Added code to clear this property when
devsound is not initialized.
Files modified & changes:
/audio/device/pub/platform/symbian/CHXMMFDevSound.h
/audio/device/platform/symbian/common/CHXMMFDevSound.cpp
/datatype/mdf/audio/dsp/mdfdevsound.cpp
/datatype/mdf/audio/dsp/mdfauddevice.cpp
Image Size and Heap Use impact: No major impact
Module Release testing (STIF) : Done
Test case(s) Added : No
Memory leak check performed : Passed, No additional leaks introduced.
Platforms and Profiles Build Verified: helix-client-s60-52-mmf-mdf-dsp
Platforms and Profiles Functionality verified: armv5
Branch: 210CayS, 420Bizo and HEAD
Attached diff.
Index: mdfdevsound.cpp
===================================================================
RCS file: /cvsroot/datatype/mdf/audio/dsp/mdfdevsound.cpp,v
retrieving revision 1.1.2.32
diff -u -w -r1.1.2.32 mdfdevsound.cpp
--- mdfdevsound.cpp 24 Mar 2010 15:08:35 -0000 1.1.2.32
+++ mdfdevsound.cpp 4 May 2010 07:04:35 -0000
@@ -594,7 +594,21 @@
hxr = LoadCustomInterfaces();
}
}
+ if(hxr != HXR_OK)
+ {
+ if(m_bDevSoundOwned == TRUE)
+ {
+ lError = m_pDevSound->CancelInitialize();
+ }
+ else
+ {
+ CHXMMFDevSound* pHxDevSound = CHXMMFDevSound::Get();
+ HX_ASSERT(pHxDevSound);
+ lError = pHxDevSound->CancelInitialize();
+ }
+ HXLOGL2(HXLOG_MDFA, "---devsnd:CancelInitialize :%d\n DevSoundOwned
%d", lError, m_bDevSoundOwned);
+ }
HXLOGL2(HXLOG_MDFA, "---devsnd:Open LoadCustomInterface:%d\n", hxr);
}
else
Index: mdfauddevice.cpp
===================================================================
RCS file: /cvsroot/datatype/mdf/audio/dsp/mdfauddevice.cpp,v
retrieving revision 1.1.2.22
diff -u -w -r1.1.2.22 mdfauddevice.cpp
--- mdfauddevice.cpp 24 Mar 2010 15:08:35 -0000 1.1.2.22
+++ mdfauddevice.cpp 4 May 2010 07:05:02 -0000
@@ -504,7 +504,16 @@
}
m_pDevSound->SetVolume(m_CurrentVolume);
}
-
+#if defined(HELIX_FEATURE_DRM_SECURE_OUTPUT)
+ else
+ {
+ if (m_pPropWatch)
+ {
+ HXLOGL2(HXLOG_ADEV, "CHXMDFAudioDevice::Open() Failed, calling
ClearWatchByName ");
+ m_pPropWatch->ClearWatchByName("MMF.SecureOutput");
+ }
+ }
+#endif //HELIX_FEATURE_DRM_SECURE_OUTPUT
HXLOGL4(HXLOG_MDFA,"mdfdev:open > hxr=%d", hxr);
return hxr;
}
Index: CHXMMFDevSound.cpp
===================================================================
RCS file: /cvsroot/audio/device/platform/symbian/common/CHXMMFDevSound.cpp,v
retrieving revision 1.1.2.2
diff -u -w -r1.1.2.2 CHXMMFDevSound.cpp
--- CHXMMFDevSound.cpp 30 Oct 2009 16:36:48 -0000 1.1.2.2
+++ CHXMMFDevSound.cpp 29 Apr 2010 06:44:03 -0000
@@ -228,6 +228,16 @@
return lRetval;
}
+TInt CHXMMFDevSound::CancelInitialize()
+{
+ if( (m_pActiveSchedulerWait != NULL) &&
+ (m_pActiveSchedulerWait->IsStarted()) )
+ {
+ m_pActiveSchedulerWait->AsyncStop();
+ }
+ return m_pStream->CancelInitialize();
+}
+
//
// CHXMMFDevSound::InitializeComplete
//
Index: ../../../../device/pub/platform/symbian/CHXMMFDevSound.h
===================================================================
RCS file: /cvsroot/audio/device/pub/platform/symbian/CHXMMFDevSound.h,v
retrieving revision 1.1.2.4
diff -u -w -r1.1.2.4 CHXMMFDevSound.h
--- ../../../../device/pub/platform/symbian/CHXMMFDevSound.h 3 Feb 2010
20:00:02 -0000 1.1.2.4
+++ ../../../../device/pub/platform/symbian/CHXMMFDevSound.h 29 Apr 2010
06:44:59 -0000
@@ -91,6 +91,7 @@
// devsound with the specified fourcc
TInt ReInitialize(MDevSoundObserver *pObserver, TFourCC fourcc);
TInt Initialize();
+ TInt CancelInitialize();
void Close();
~CHXMMFDevSound();
_______________________________________________
Audio-dev mailing list
[email protected]
http://lists.helixcommunity.org/mailman/listinfo/audio-dev