Soleus Audio Manager Help
Upcoming SlideShare
Loading in...5
×
 

Soleus Audio Manager Help

on

  • 831 views

 

Statistics

Views

Total Views
831
Views on SlideShare
831
Embed Views
0

Actions

Likes
1
Downloads
0
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Soleus Audio Manager Help Soleus Audio Manager Help Document Transcript

  • ® Soleus : Audio Manager Help ™ Intrinsyc Software International, Inc. Confidential & Proprietary Duplication prohibited without license from Intrinsyc Software International, Inc.
  • Soleus™: Audio Manager Help How it works?, Page 2 of 11 Copyright 2006 - 2007 Intrinsyc Software International, Inc. All rights reserved. Patents pending in the United States and other jurisdictions. ™ & ® Intrinsyc, Soleus and their respective logos are trademarks, registered and otherwise, of Intrinsyc Software International, Inc. in Canada, European Union, United States of America and other jurisdictions. Other products and services mentioned in this document are identified by the trademarks or service marks of their respective companies or organizations. No part of this publication or any software included with it, may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, including photocopying, electronic, mechanical, recording or otherwise, without the prior written permission of the copyright holder. Intrinsyc Software International, Inc. (“Intrinsyc”) and its subsidiaries and affiliates provides this document as is, without warranty of any kind either expressed or implied included, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. Intrinsyc may make changes or improvements in the equipment, software, or specifications described in this document at any time and without notice. These changes may be incorporated in new releases of this document. This publication is contains confidential and proprietary information of Intrinsyc, and is for ‘authorized internal use only’ by Intrinsyc personal, or for supply to Intrinsyc Licensees under terms of their Software License Agreement with Intrinsyc Software International, Inc. It contains proprietary information of Intrinsyc and any disclosure to persons or employees, agents or subcontractors of such persons, not directly authorized by Intrinsyc in such a Software License Agreement is strictly prohibited. Any person who receives this document and is not authorized to do so should immediately notify Intrinsyc at the address below to arrange for return of the materials and any copies made. This publication may contain technical inaccuracies or typographical errors. Intrinsyc and its subsidiaries waive responsibility for any labor, materials, or costs incurred by any person or party as a result of using this document. Intrinsyc and any of its subsidiaries or other affiliates shall not be liable for any damages (including, but not limited to, consequential, indirect or incidental, special damages, or loss of profits or data) even if they were foreseeable and Intrinsyc has been informed of their potential occurrences arising out of or in connection with this document or its use. Computer Software Copyrights The Intrinsyc products described in this publication include copyrighted computer programs developed by Intrinsyc which are stored in semiconductor memories and other media. Laws in Canada and other countries preserve for Intrinsyc certain rights for copyrighted computer programs, including the exclusive right to copy or reproduce in any form the copyrighted computer program. Accordingly, no part of this software, or any documentation included with it, may be reproduced, stored in a retrieval system, or transmitted in any form of by any means, including photocopying, electronic, mechanical, recording or otherwise without the express written permission of Intrinsyc. Unauthorized reproduction or distribution of Intrinsyc computer software and programs, or any portion thereof, may result in severe civil and criminal penalties and will be prosecuted to the maximum extent possible under the law. Furthermore, the purchase of Intrinsyc products shall not be deemed to grant either directly or by implication, estoppel, or otherwise, any license under the copyrights, patents or patent applications of Intrinsyc, except for the normal non-exclusive license to use that arises by operation of laws in the sale of the product. Government Approvals User must, at its expense, obtain and maintain any government approvals, consents, licenses authorizations, declarations, filings and registrations as may be necessary or advisable for use of Intrinsyc products, software and associated documentation. User must also pay, and indemnify, Intrinsyc for any sales taxes, use taxes, and any other taxes imposed by any jurisdiction as a result of the use of Intrinsyc’s software and associated documentation. Restricted Rights Use, duplication, or disclosure of commercial computer software and its associated documentation under Intrinsyc’s copyrights and/or trade secret rights is subject to the restricted rights set forth herein. User’s use of the software and associated documentation in any manner constitutes user’s agreement to these restricted rights. Distribution to U.S. Government Agencies Licensee will comply with all applicable laws rules and regulations to preclude the acquisition of unlimited rights to technical data, software, and documentation provided with the software to a governmental agency, and ensure the inclusion of the appropriate “Restricted Rights” or “Limited Rights” notices required by the U.S. Government agencies. U.S. Government Export Restrictions User shall adhere to the U.S. Export Administration Regulations (EAR), currently found at 15 C.F.R. Sections 730 through 744, and shall not export or re-export or release the technology, software, or any source code to a national of a country in Country Groups D:1 or E:1, or export to Country Groups D:1 or E:1 the direct product of such technology, if such foreign produced direct product is subject to national security controls as identified on the Commerce Control List (currently found in Supplement 1 to Section 774 or EAR), unless property authorized by the U.S. Government. These export requirements shall survive any expiration or termination of this Agreement. Intrinsyc Software International, Inc. (as agent for Intrinsyc Software (Barbados) Inc.) 10th Floor, 700 West Pender Street Vancouver, British Columbia Canada V6C 1G8 Telephone: 1.604.801.6461 Fax: 1.604.801.6417 Confidential & Proprietary Duplication prohibited without license from Intrinsyc Software International, Inc.
  • Soleus™: Audio Manager Help How it works?, Page 3 of 11 Contents Soleus™: Audio Manager Help.................................................1 Intrinsyc Software International, Inc........................................1 Contents................................................................................3 3 Introduction...........................................................................5 How it works?.........................................................................6 Revision History Name Date Reason For Changes Version Confidential & Proprietary Duplication prohibited without license from Intrinsyc Software International, Inc.
  • Soleus™: Audio Manager Help How it works?, Page 4 of 11 Alan Chong July 19, 2007 Initial draft 0.01 Confidential & Proprietary Duplication prohibited without license from Intrinsyc Software International, Inc.
  • Soleus™: Audio Manager Help How it works?, Page 5 of 11 Introduction The Soleus Audio Manager is responsible for setting and maintaining different audio profiles for different applications. The profiles are maintained in a stack (LIFO) in which the topmost audio profile will be the current profile active on the device. (See figure below) MY_PROFILE_TEL (App2) MY_PROFILE_MM (App1) DEFAULT_PROFILE Stack (LIFO) Please note that pathways and audio profiles are always mentioned in this document. They are the same and can be used interchangeably. Applications exercise the audio machine through the Soleus Audio Manager APIs. Examples of APIs are SOLAM_Initialize(), SOLAM_Activate(), SOLAM_Switch(), etc. The audio driver must have mixer APIs implemented. (See figure below) App1 App2 ... AppN Soleus Audio Manager (APIs) Mixer APIs Confidential & Proprietary Duplication prohibited without license from Intrinsyc Software International, Inc.
  • Soleus™: Audio Manager Help How it works?, Page 6 of 11 How it works? When device first started, the Soleus Audio Manager is activated as a service and the stack is initialized with a default audio profile. See below. Current active profile DEFAULT_PROFILE Stack (LIFO) At this point, ProfileCount = 1 (Since the system has only the default profile) Below is a walkthrough on how applications can exercise the Audio Manager. Example: For simplicity, let’s assume that there two audio profiles to be used in the system MY_PROFILE_MM This profile is to allow music to be heard when MediaApp is launched. MY_PFOFILE_TELThis profile is to allow GSM voice to be heard during MO/MT call. See below for illustrations on how the audio profiles are stacked when MediaApp.exe is launched and a call is made or received (Dialer.exe). When MediaApp.exe is launched, it invokes SOLAM_Activate(MY_PROFILE_MM, ….MMCallBackFn,…) and passes a callback function MMCallBackFn. Profile MMY_PROFILE_MM is being activated as the system has only one profile in the stack.. At the same time, it passes a callback function called MMCallBackFn that will be call backed for some reason. MY_PROFILE_MM Current active profile MY_PROFILE_MM Current active profile DEFAULT_PROFILE DEFAULT_PROFILE Stack (LIFO) Stack (LIFO) At this point, ProfileCount is incremented to 2 HRESULT MMCallBackFn(HSOLAUDIO hSolAudio, DWORD dwReason, LPARAM lParam) { HRESULT hr = S_OK; // Sentry: ensure hSolAudio handle is valid … // Check what is the reason that it is callback. switch(dwReason) { case SOLAUDIO_CONTENDING: // Need to use lParam to check if other app can // take over the audio machine. … case SOLAUDIO_RESTORING: … } return hr; } Confidential & Proprietary Duplication prohibited without license from Intrinsyc Software International, Inc.
  • Soleus™: Audio Manager Help How it works?, Page 7 of 11 The above is a snippet of how the callback function is coded. It will be re-visited later. When a call is being received, the Dialer.exe call SOLAM_Activate(MY_PROFILE_TEL,…TELCallBackFn, …). Before it is being activated, SAM will check if there are more than 1 audio profile that are on the stack. Since MY_PROFILE_MM is the current profile, SAM will invoke MMCallBackFn with dwResason as SOLAUDIO_CONTENDING. At this point, if MMCallBackFn decides that MY_PROFILE_TEL cannot take over the audio machine, MMCallBackFn will return S_FALSE. For our example, MMCallBackFn return S_OK in order for MY_PROFILE_TEL to take over the audio machine for MO/MT call. Question: How does the MMCallBackFn knows if the other applications contending for the audio machine can take over? Answer: Remember that lParam is passed SOLAM_Activate() whenever an application want to take over the audio machine. One suggestion is to make use of lParam to allow various callback functions to determine the precedence of each audio profile. It is up to the OEMs to come out with a strategy. MY_PROFILE_TEL Current active profile MY_PROFILE_TEL Current active profile MY_PROFILE_MM MY_PROFILE_MM DEFAULT_PROFILE DEFAULT_PROFILE Stack (LIFO) Stack (LIFO) When MO/MT call is completed, it releases the audio machine by calling SOLAM_Release() API. At this point, MMCallBackFn will be called back with dwReason as SOLAUDIO_RESTORING. MY_PROFILE_TEL Current active profile MY_PROFILE_MM DEFAULT_PROFILE Stack (LIFO) Confidential & Proprietary Duplication prohibited without license from Intrinsyc Software International, Inc.
  • Soleus™: Audio Manager Help How it works?, Page 8 of 11 A peek at the registry to understand Soleus Audio Manager is activated as a service. [HKEY_LOCAL_MACHINEServicesSolAudioManager] quot;Dllquot;=quot;SolAudioManagerquot; quot;Orderquot;=dword:92 quot;Prefixquot;=quot;SAMquot; quot;Indexquot;=dword:0 quot;Contextquot;=dword:0 quot;DisplayNamequot;=quot;Soleus Audio Managerquot; quot;Descriptionquot;=quot;Soleus Audio Manager Servicequot; quot;Flagsquot;=dword:0 When SolAudioManager service is activated, SAM_Init() is being and it does the followings 1. Opens the mixer device (mixerOpen) 2. Create a default audio profile and push onto the stack, thus making this newly created profile as the current profile. 3. Load various audio profiles that are stored in the registry. (Reference: SAMSrv.cpp LoadPathwayEntries()) During design phase, the design team (OEM) has to determine a list of audio profiles to be used for their product. Confidential & Proprietary Duplication prohibited without license from Intrinsyc Software International, Inc.
  • Soleus™: Audio Manager Help How it works?, Page 9 of 11 Below is an example of the audio profile that Intrinsyc used for their Soleus reference platform. For Soleus reference platform, the following audio profiles (“PathID”) are defined. “PathId” Default 0 NormalCall 1 Media 2 TelOutMute 3 SpeakerPhone 4 These profiles define how the audio machine of the device is designed. “Id” Monitor 3 TelOut 6 Speaker 3 or 4 Headphones 5 “PathId” is the ID (enum) of the audio profiles. (For more information, take a look at the how dialer app exercises the Soleus Audio Manager APIs). “Id” is what the mixer APIs will receive. PathId is identification for the audio driver to setup its hardware mixer according to the current audio profiles. It is up to the OEM to define their values. ; Soleus Audio Manager Pathway Data ; Default Pathway. This sets the monitor telout speaker and headphones nodes ON [HKEY_LOCAL_MACHINESOFTWAREIntrinsycSoleusSystemsSolAudioManagerPathwaysDe fault] quot;PathIdquot;=dword:0 quot;VolumeInIDquot;=dword:6 quot;VolumeOutIDquot;=dword:4 [HKEY_LOCAL_MACHINESOFTWAREIntrinsycSoleusSystemsSolAudioManagerPathwaysDe faultMonitor] quot;Idquot;=dword:3 quot;Mutequot;=dword:0 quot;Volumequot;=dword:10 [HKEY_LOCAL_MACHINESOFTWAREIntrinsycSoleusSystemsSolAudioManagerPathwaysDe faultTelOut] quot;Idquot;=dword:6 quot;Mutequot;=dword:0 quot;Volumequot;=dword:10 [HKEY_LOCAL_MACHINESOFTWAREIntrinsycSoleusSystemsSolAudioManagerPathwaysDe faultSpeaker] quot;Idquot;=dword:4 quot;Mutequot;=dword:0 quot;Volumequot;=dword:10 [HKEY_LOCAL_MACHINESOFTWAREIntrinsycSoleusSystemsSolAudioManagerPathwaysDe faultHeadphones] quot;Idquot;=dword:5 Confidential & Proprietary Duplication prohibited without license from Intrinsyc Software International, Inc.
  • Soleus™: Audio Manager Help How it works?, Page 10 of 11 quot;Mutequot;=dword:0 quot;Volumequot;=dword:10 ; Normal Call Pathway. This sets the monitor telout speaker nodes ON [HKEY_LOCAL_MACHINESOFTWAREIntrinsycSoleusSystemsSolAudioManagerPathwaysNo rmalCall] quot;PathIdquot;=dword:1 quot;VolumeInIDquot;=dword:6 quot;VolumeOutIDquot;=dword:3 [HKEY_LOCAL_MACHINESOFTWAREIntrinsycSoleusSystemsSolAudioManagerPathwaysNo rmalCallMonitor] quot;Idquot;=dword:3 quot;Mutequot;=dword:1 quot;Volumequot;=dword:00 [HKEY_LOCAL_MACHINESOFTWAREIntrinsycSoleusSystemsSolAudioManagerPathwaysNo rmalCallTelOut] quot;Idquot;=dword:6 quot;Mutequot;=dword:0 quot;Volumequot;=dword:10 [HKEY_LOCAL_MACHINESOFTWAREIntrinsycSoleusSystemsSolAudioManagerPathwaysNo rmalCallSpeaker] quot;Idquot;=dword:4 quot;Mutequot;=dword:0 quot;Volumequot;=dword:10 ; Media Pathway. This sets the speaker node ON [HKEY_LOCAL_MACHINESOFTWAREIntrinsycSoleusSystemsSolAudioManagerPathwaysM edia] quot;PathIdquot;=dword:2 quot;VolumeInIDquot;=dword:4 quot;VolumeOutIDquot;=dword:4 [HKEY_LOCAL_MACHINESOFTWAREIntrinsycSoleusSystemsSolAudioManagerPathwaysM ediaSpeaker] quot;Idquot;=dword:3 quot;Mutequot;=dword:0 quot;Volumequot;=dword:10 ; Mute Pathway. This sets the Mute ON Tel Out [HKEY_LOCAL_MACHINESOFTWAREIntrinsycSoleusSystemsSolAudioManagerPathwaysTe lOutMute] quot;PathIdquot;=dword:3 quot;VolumeInIDquot;=dword:6 quot;VolumeOutIDquot;=dword:6 [HKEY_LOCAL_MACHINESOFTWAREIntrinsycSoleusSystemsSolAudioManagerPathwaysTe lOutMuteTelOut] quot;Idquot;=dword:6 quot;Mutequot;=dword:1 quot;Volumequot;=dword:00 Confidential & Proprietary Duplication prohibited without license from Intrinsyc Software International, Inc.
  • Soleus™: Audio Manager Help How it works?, Page 11 of 11 ; Speakerphone Pathway. This sets the Speaker ON [HKEY_LOCAL_MACHINESOFTWAREIntrinsycSoleusSystemsSolAudioManagerPathwaysSp eakerPhone] quot;PathIdquot;=dword:4 quot;VolumeInIDquot;=dword:4 quot;VolumeOutIDquot;=dword:4 [HKEY_LOCAL_MACHINESOFTWAREIntrinsycSoleusSystemsSolAudioManagerPathwaysSp eakerPhoneSpeaker] quot;Idquot;=dword:3 quot;Mutequot;=dword:0 quot;Volumequot;=dword:10 Confidential & Proprietary Duplication prohibited without license from Intrinsyc Software International, Inc.