Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Choose QRadioTuner Audio Output: Bluetooth over Wired (Symbian Qt)
QtWS25 Last Chance

Choose QRadioTuner Audio Output: Bluetooth over Wired (Symbian Qt)

Scheduled Pinned Locked Moved Mobile and Embedded
14 Posts 3 Posters 8.9k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • X Offline
    X Offline
    xsacha
    wrote on last edited by
    #1

    Hey guys
    Some background info:
    I like listening to the radio. I also like using bluetooth headphones.
    The radio in mobile devices requires a wired headset.
    I always thought if you're going to attach a long wired cord to your phone, you may as well use it. That is until I found "this cord":http://www.yourcablestore.com/assets/images/h3m2m1.jpg in my house.
    It's a very small 3.5mm male to 3.5mm cable.

    I tested this cable out and it gives me perfect signal for my favourite radio stations! Awesome! One problem: as soon as I plug this cable in to my Symbian device, the bluetooth audio cuts out and it tries to pump audio via the headphone jack. Not cool!

    So I wrote my own Radio app in Qt (QRadioTuner). Can download "Symbian version here":http://www.wikiupload.com/G03I5WDE2CU75HQ if you want to see.
    It also exhibits the same problem.

    So I am wondering, how can I force the app to output via Bluetooth rather than headphone jack?

    • Sacha
    1 Reply Last reply
    0
    • K Offline
      K Offline
      kamalakshantv
      wrote on last edited by
      #2

      I dont think there would be any API to route audio in Qt. You can have it done in symbian using native symbian API.

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kamalakshantv
        wrote on last edited by
        #3

        In symbian you can make use of the Audio Routing API plugin. "This":http://wiki.forum.nokia.com/index.php/Audio_Routing_API_–_Input_and_Output wiki article might help you. Its supported only from 3rd Ed FP1 onwards.

        1 Reply Last reply
        0
        • X Offline
          X Offline
          xsacha
          wrote on last edited by
          #4

          Even that API you linked to seems incapable of choosing which output to use.
          It has options as None, All, Private, Public.

          Both the bluetooth headset and the headphone jack are classified as 'Private'. If I choose 'Private', it will choose headphone jack.

          Anyway, I believe you can change audio output in Phonon but only for media that you play via Phonon. Right?

          Also found "this relevant post":http://developer.qt.nokia.com/forums/viewthread/1883 on forum.

          • Sacha
          1 Reply Last reply
          0
          • K Offline
            K Offline
            kamalakshantv
            wrote on last edited by
            #5

            [quote author="xsacha" date="1292137696"]Even that API you linked to seems incapable of choosing which output to use.
            It has options as None, All, Private, Public.

            Both the bluetooth headset and the headphone jack are classified as 'Private'. If I choose 'Private', it will choose headphone jack.

            Anyway, I believe you can change audio output in Phonon but only for media that you play via Phonon. Right?

            Also found "this relevant post":http://developer.qt.nokia.com/forums/viewthread/1883 on forum.[/quote]

            Yes, it seems so. When I had used it I had to route it to loudspeaker.

            I have not explored Phonon libraries. Also it seems I had read somewhere that for mobile it might be replaced by QMultimedia.

            1 Reply Last reply
            0
            • X Offline
              X Offline
              xsacha
              wrote on last edited by
              #6

              Well that forum post I linked to mentions QtMultimedia for Symbian.
              It mentions that Symbian has a 'S60MediaPlayerAudioEndpointSelector'. Great! So I "checked the source out":http://qt.gitorious.org/qt-mobility/contacts/blobs/master/plugins/multimedia/symbian/mmf/mediaplayer/s60mediaplayeraudioendpointselector.cpp.
              'Default' -> No. 'All' -> No. 'None' -> No. 'Earphone' -> No. 'Speaker' -> No!

              Seriously? Have they forgotten about Bluetooth, FM Transmitter and any other audio outputs that are possible?

              It seems that these outputs are grouped under 'Earphone'. They are only used when an earphone isn't available.


              Also, this QRadioTuner seems to use "OpenMAXAL":http://qt.gitorious.org/qt-mobility/contacts/trees/master/plugins/multimedia/symbian/openmaxal/radiotuner which doesn't seem to have any audio output options available.
              This is the line I want options for:
              xaradiosessionimpl.cpp
              @
              locator_outputmix.locatorType = XA_DEFAULTDEVICEID_AUDIOOUTPUT;
              audioSink.pLocator = (void*) &locator_outputmix;
              @

              • Sacha
              1 Reply Last reply
              0
              • K Offline
                K Offline
                kamalakshantv
                wrote on last edited by
                #7

                That's something I am worried about. There is lot of things to be supported in Qt API's and it has a long way to go. Till then I feel comfortable relying only with Symbian SDK for such projects.

                Also in symbian some api's are exposed only to partners - don't know how Qt will be handling this.

                1 Reply Last reply
                0
                • X Offline
                  X Offline
                  xsacha
                  wrote on last edited by
                  #8

                  Obviously, I don't want to rewrite the whole radio in Symbian C++. And I can't change the Radio's output directly in Qt. So I'm looking for a solution in between.

                  See that OpenMAXAL code above? Is there a way to add options to this and expose it to my source? It'd then work on devices? Or is that baked in to the Qt libraries?

                  By the way: It would at least solve my use-case if the cable could be identified as an 'Antenna' rather than 'Headphones' so it wouldn't try to play music via it. Unfortunately, the radio complains 'Connect a wired headset' if I make the cable identify as anything other than 'Headphones'.

                  • Sacha
                  1 Reply Last reply
                  0
                  • A Offline
                    A Offline
                    alexander
                    wrote on last edited by
                    #9

                    xsacha, I use Nokia BH-505 with my Nokia 5800 and it works well with standard radio application. (I use half of my old headsets - only cable with control console)

                    1 Reply Last reply
                    0
                    • X Offline
                      X Offline
                      xsacha
                      wrote on last edited by
                      #10

                      I'm not familiar with the BH-505 other than knowing it has a wired and bluetooth mode.

                      You are using BH-505 in bluetooth (non-wired) mode? You also have a used headphone jack with half an old cable to get antenna signal from? Yet it plays back via bluetooth?
                      Can you take me through the steps you do to achieve this? Thanks.

                      • Sacha
                      1 Reply Last reply
                      0
                      • A Offline
                        A Offline
                        alexander
                        wrote on last edited by
                        #11

                        Yes, I'm using BH-505 in bluetooth mode. And I'm also using headphone jack with half an old cable to get antenna signal:)

                        1 Reply Last reply
                        0
                        • A Offline
                          A Offline
                          alexander
                          wrote on last edited by
                          #12

                          Which phone do you use?

                          1 Reply Last reply
                          0
                          • X Offline
                            X Offline
                            xsacha
                            wrote on last edited by
                            #13

                            Same as you, Nokia 5800.

                            It won't play radio without a wired line from headphone jack. But once I connect it, it tries to put audio through the headphone jack... even though it's just a dead line connected to nothing.
                            Of course, it gives me an option to use loudspeaker instead. But that wouldn't help :(.

                            • Sacha
                            1 Reply Last reply
                            0
                            • A Offline
                              A Offline
                              alexander
                              wrote on last edited by
                              #14

                              I use next item as antenna - "http://pikucha.ru/852752":http://pikucha.ru/852752

                              1 Reply Last reply
                              0

                              • Login

                              • Login or register to search.
                              • First post
                                Last post
                              0
                              • Categories
                              • Recent
                              • Tags
                              • Popular
                              • Users
                              • Groups
                              • Search
                              • Get Qt Extensions
                              • Unsolved