×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User
    Join Date
    Jun 2008
    Posts
    17

    Question No audio over bluetooth HFP, but standard media player works (using CMdaAudioPlayerU)

    Hi All,

    I've got a problem which I can't solve. Searching in google and Nokia forums doesn't help a lot :-(

    Here is description of problem:

    HW = Nokia N95, Hands-Free (BVC, Ford)
    SW = Symbian s60 3rd. FeaturePack 1 (FP1) present, but not used to avoid compatibility problems.

    My application just plays audio files using CMdaAudioPlayerUtility and communicates with BVC over SPP. I can't give a source code because it's a part of big project.

    Hands-Free (BVC) has following BT-services:

    0x110E // AVRCP - (it allows controlling of media player per bluetooth)
    0x111E // HFP Handsfree
    0x110B // Audio Sink (A2DP Sink)
    0x1101 // SPP Serial Port

    N95 paired with Hands-Free using Hand-Free-Profile (HFP).
    I hope, that the AVRCP is not used in that case (at least I don't use it from application).

    TestCase 1:
    The BVC is not connected, so the HFP is not active.
    Playing of audio in my application works grate and the sound goes from phone-speakers. Similar works the standard media-player at phone.

    TestCase 2:
    The BVC is connected, so the HFP is active (but not incomming call is active yet). In that case no more audio comes from speakers, neither from my application nor from standard media player. The hands-free is also silent in that case (it plays sound from internal radio, but no from mobile phone).

    TestCase 3:
    Incoming call accepted by phone.
    The call-tone so good as speech-audio are hearable from Hands-Free (BVC). Now if I play a sound file during call - no any sound comes from my application at all. Playing of same file in standard media player - produces normaly sound over HFP and Hands-Free.

    What was also tested:
    if the call is finished - no more sound goes from phone over HFP untill a next call. So far I disconnect the hands-free (in menu of mobile phone or by turning his power off) - the phone-sound goes again perfectly from the phone-speakers (by media player so good as by my application.)

    So my application works similar to media player, except one case when the HFP and call are active. In that case I can't hear something from my application at all and the media player makes sound over HFP and Hands-Free. :-(

    Here are my questions:

    1) What may be the reason of my application can't play audio over HFP during call?

    2) Is it possible to use audio-channel of HFP from application without a real call? (actually the BVC knows when the application plays something)

    The SPP used by application to communicate with BVC, but it has no influence: if I start playing in my application and in media-player simultaneously - the sound goes from media player.

    Thanks for your answers!
    Andrey

  2. #2
    Super Contributor
    Join Date
    Mar 2008
    Posts
    1,481

    Re: No audio over bluetooth HFP, but standard media player works (using CMdaAudioPlay

    Hi,

    This is by design, is it not logical?

  3. #3
    Registered User
    Join Date
    Jun 2008
    Posts
    17

    Lightbulb Re: No audio over bluetooth HFP, but standard media player works (using CMdaAudioPlay

    No, this is not logical (so far the audio played - it should be hearable somewhere).

    I think, I'd found the reason for question (1):

    http://www.forum.nokia.com/document/...S60_3rd_Ed.htm

    3rd-party applications cannot control audio routing or mix audio with an active voice call on S60 3rd Edition.


    3rd-party applications on S60 3rd Edition have some limitations in their audio routing and playback capabilities.

    1) VoIP applications: The voice will be directed only to the loudspeaker and not to the earpiece because all 3rd-party audio applications are treated as “Players/Recorders”.

    2) 3rd-party applications cannot mix audio with an ongoing circuit-switched voice call. This is due to a hard-coded Vendor ID check in the mixing policy between 3rd-party "Players" and native telephony application.

    3) Applications that try to play custom/video ring tones are not able to play the ring tone if the Nokia music player is playing music at the same time when there is an incoming call.

    Audio preference and priority values sent by the 3rd-party application are ignored if the application does not have Symbian or Nokia Vendor ID. Typically developers’ VID is 0x00000000. Nokia’s VID is not available for 3rd parties.


    Forum Nokia provides an Audio Proxy Server (APS) wrapper that can be used for creating audio streams with custom preference and priority values. APS is part of the Extensions plug-in package for S60 3rd Edition SDKs:

    Extensions plug-in package for S60 3rd Edition SDK for Symbian OS, for C++, MR

    Extensions plug-in package for S60 3rd Edition SDK for Symbian OS, for C++, Supporting Feature Pack 1

    Note that S60 3rd Edition and S60 3rd Ed, FP1 devices require different versions of the APS server binaries.
    But the question (2) still stays open :-(

    Wbr,
    Andrey

  4. #4
    Registered User
    Join Date
    Jun 2008
    Posts
    17

    Lightbulb Re: No audio over bluetooth HFP, but standard media player works (using CMdaAudioPlay

    Hi All!

    here are some news about the issue.
    I've used the Audio Roating API Plugin for s60 3rd Ed SDK FP1.
    (You need MultimediaDD capability to use it). Using the Plugin, Ive get the possibility to hear the sound with active HFP at least from phone-speakers.
    No it works in this way:
    so far no call active, the audio from my program goes over phone-speakers. If the call comes, no more audio comes from my application and the call-audio comes over BVC (i.e. over HFP).
    That's Ok for begin, because in this way it can be used at least.

    What was changed:
    1. Added capability "MultimediaDD" to the certificate
    2. Audio Roating Plugin unpacked to Symbian directory (see detailed description is in the plugin)
    3. in MyApplication.mmp file added "audiooutputrouting.lib"
    4. in the class which plays audio (and uses "CMdaAudioPlayerUtility") changed:
      I) in header-file:
      a) added
      #include "AudioOutput.h"
      #include "MAudioOutputObserver.h"
      b) added inheritance
      public MAudioOutputObserver
      c) added definition of 2 functions:
      // sets the audio roating
      void SetRoutingL(CAudioOutput::TAudioOutputPreference & aNewPreference);
      // callback function if audio roating changed
      void DefaultAudioOutputChanged( CAudioOutput & aAudioOutput, CAudioOutput::TAudioOutputPreference aNewDefault );
      d) added new member variable:
      CAudioOutput *m_pAudioOutput; // for audio roating
      II) in cpp-file:
      a) in the constructor of class added initiation of member variable:
      m_pAudioOutput(NULL)
      b) in the destructor added:
      if(m_pAudioOutput)
      {
      delete m_pAudioOutput;
      m_pAudioOutput = NULL;
      }
      c) in the function implementation just before call of Play() methode of CMdaAudioPlayerUtility added audio-roating:
      // set the audio roating, possible values:
      // ENoPreference - playing audio routed to any speaker. (This is the default value for audio);
      // EAll - playing audio routed to all speakers;
      // ENoOutput - not route of playing audio to any output;
      // EPrivate - playing audio routed to the default private speaker (that can only be heard by one person);
      // EPublic - playing audio routed to the default public speaker (that can be heard by multiple people).
      CAudioOutput::TAudioOutputPreference tmpNewReference = CAudioOutput::EAll;
      SetRoutingL( tmpNewReference );
      d) added implementation of 2 new functions:
      // sets the audio roating
      void WavePlayer::SetRoutingL (CAudioOutput::TAudioOutputPreference & aNewPreference)
      {
      if(m_pAudioOutput)
      {
      delete m_pAudioOutput;
      m_pAudioOutput = NULL;
      }
      if (m_playerUtility)
      {
      TRAPD(err, m_pAudioOutput = CAudioOutput::NewL(*m_playerUtility) );
      if (err != KErrNone)
      {
      // no audio roating possible, add here your trace message or required action

      }
      else // the roating can be used
      {
      // m_pAudioOutput->RegisterObserverL(*this); // temporary disabled so far not really use it (but may be useful in some cases)
      m_pAudioOutput->SetAudioOutputL(aNewPreference);
      }
      }
      }

      // callback function if audio roating changed
      void WavePlayer:efaultAudioOutputChanged( CAudioOutput & aAudioOutput, CAudioOutput::TAudioOutputPreference aNewDefault )
      {
      // add your trace message here (the audio roating was changed)

      }


    Then was made a clean-build.
    Hope, this information may be useful for somebody ;-)
    (sorry for this formating the code, but it comes from forum, not from me. And the usual CODE tags I not like to use because of impossible to print then the code (so just insert it in your code if like and apply auto-formating :-) ))

    Wbr,
    Andrey

  5. #5
    Registered User
    Join Date
    Jun 2008
    Posts
    17

    Lightbulb Re: No audio over bluetooth HFP, but standard media player works (using CMdaAudioPlay

    Here is the status update of described issue.

    1) It looks that our application not need extra audio roating because:
    2) The phone makes audio roating already correctly. So far the HFP is activated - it plays audio over HFP. But (!) if the phone supports A2DP, and the paired device (BVC) also supports A2DP (has A2DP in list of services), the phone switches automatical to A2DP. But it looks that in BVC which was provided to us for tests, present a bug: it doesn't really support the A2DP for communication with our SW (so at least it doesn't use it for playing our audio to head-unit). Actually BVC uses A2DP only during call. That is why we can't here anything if the phone is connected to BVC ans no call is active. The internal (Nokia) player just has more rights to play the audio to call-uplink.

    So if we disconnect the phone from BVC in Bluetooth menu (and leave SPP connection alive in our application) - the audio goes from phone normally through phone-speakers. If we connect a phone without A2DP to the BVC, the audio goes through Headunit-speakers (i.e. through BVC and HFP)!

    So the topic is now clear. I hope that information helps for somebody to answer the questions.

    Wbr,
    Andrey

  6. #6
    Registered User
    Join Date
    Oct 2008
    Posts
    1

    Re: No audio over bluetooth HFP, but standard media player works (using CMdaAudioPlay

    Hello Andrey,

    The issue you described here is exactly what I was looking into in the last couple of days. Your information was very helpful

    Thanks,
    Andrey

  7. #7
    Registered User
    Join Date
    Jun 2009
    Posts
    3

    Re: No audio over bluetooth HFP, but standard media player works (using CMdaAudioPlay

    Hi,
    I think I have the same problem.
    When I connect my N95 to my car's bluetooth, no audio (except for phone calls audio) is heard from the car's speakers. On the other hand, the phone's speakers are muted so I can't hear other than voice call audio (e.g. music, navigation guidance) from the phone's speakers.
    Please advice
    Thanks
    Gil

  8. #8
    Registered User
    Join Date
    Aug 2009
    Posts
    1

    Thumbs up Re: No audio over bluetooth HFP, but standard media player works (using CMdaAudioPlay

    Hi All,

    Is there a solution for poeple like me who are not devellopers? I have the same problem as a lot off poeple at this moment because off upcoming navigation software on the n-series which spoken directions cannot be heared anymore.

    Sending output to phone speakers would be great!

    kind regards Christian

  9. #9
    Registered User
    Join Date
    Feb 2012
    Posts
    2

    Unhappy Re: No audio over bluetooth HFP, but standard media player works (using CMdaAudioPlay

    Quote Originally Posted by chris_ttm View Post
    Hi All,

    Is there a solution for poeple like me who are not devellopers? I have the same problem as a lot off poeple at this moment because off upcoming navigation software on the n-series which spoken directions cannot be heared anymore.

    Sending output to phone speakers would be great!

    kind regards Christian
    I'm too looking for one application to resolve this problem.

  10. #10
    Nokia Developer Expert
    Join Date
    Sep 2011
    Posts
    382

    Re: No audio over bluetooth HFP, but standard media player works (using CMdaAudioPlay

    This may resolve your problem. Please note that not all N-series device is compatible.

Similar Threads

  1. AMR audio streaming player
    By antix in forum Mobile Java Media (Graphics & Sounds)
    Replies: 5
    Last Post: 2007-03-13, 01:12
  2. SDK V2.0 works better than V1.2 on bluetooth issues?
    By liying in forum Bluetooth Technology
    Replies: 1
    Last Post: 2004-02-02, 16:15
  3. Nokia 7650 support Bluetooth audo?
    By ovjo12 in forum Bluetooth Technology
    Replies: 5
    Last Post: 2003-07-17, 18:50
  4. Bluetooth turning any home audio into wireless jukebox ?
    By jpbuttet in forum PC Suite API and PC Connectivity SDK
    Replies: 0
    Last Post: 2003-07-11, 09:13
  5. Belkin USB Bluetooth Adapter Works!
    By jonawebb in forum Bluetooth Technology
    Replies: 10
    Last Post: 2003-06-21, 20:10

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •