<html>
  <head>
    <meta content="text/html; charset=ISO-8859-15"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Am 15.05.2014 08:18, schrieb Radek
      Polak:<br>
    </div>
    <blockquote cite="mid:201405150818.59122.psonek2@seznam.cz"
      type="cite">
      <meta name="qrichtext" content="1">
      <style type="text/css">
p, li { white-space: pre-wrap; </style>
      <p style="-qt-paragraph-type:empty; margin-top:0px;
        margin-bottom:0px; margin-left:0px; margin-right:0px;
        -qt-block-indent:0; text-indent:0px; "> </p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;">Hi Sebastian,</p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;">maybe it broke with never bluez version -
        something like this:</p>
      <p style="-qt-paragraph-type:empty; margin-top:0px;
        margin-bottom:0px; margin-left:0px; margin-right:0px;
        -qt-block-indent:0; text-indent:0px; "> </p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;"> <a class="moz-txt-link-freetext" href="https://github.com/radekp/qtmoko/issues/156">https://github.com/radekp/qtmoko/issues/156</a></p>
      <p style="-qt-paragraph-type:empty; margin-top:0px;
        margin-bottom:0px; margin-left:0px; margin-right:0px;
        -qt-block-indent:0; text-indent:0px; "> </p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;">I used this page to implement it:</p>
      <p style="-qt-paragraph-type:empty; margin-top:0px;
        margin-bottom:0px; margin-left:0px; margin-right:0px;
        -qt-block-indent:0; text-indent:0px; "> </p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;"> <a class="moz-txt-link-freetext" href="http://wiki.openmoko.org/wiki/A2DP">http://wiki.openmoko.org/wiki/A2DP</a></p>
      <p style="-qt-paragraph-type:empty; margin-top:0px;
        margin-bottom:0px; margin-left:0px; margin-right:0px;
        -qt-block-indent:0; text-indent:0px; "> </p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;">IIRC you should have /home/root/.asoundrc -
        this tells alsa about your bluetooth headset. Can you check if
        QtMoko correctly creates it?</p>
      <p style="-qt-paragraph-type:empty; margin-top:0px;
        margin-bottom:0px; margin-left:0px; margin-right:0px;
        -qt-block-indent:0; text-indent:0px; "> </p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;">Then you can try from SSH:</p>
      <p style="-qt-paragraph-type:empty; margin-top:0px;
        margin-bottom:0px; margin-left:0px; margin-right:0px;
        -qt-block-indent:0; text-indent:0px; "> </p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;"> ssh <a class="moz-txt-link-abbreviated" href="mailto:root@192.168.0.202">root@192.168.0.202</a></p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;"> . /opt/qtmoko/qpe.env</p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;"> <span style=" font-family:'Courier
          New,courier';">mplayer -ao alsa:device=bluetooth
          /path/to/file.ogg</span></p>
      <p style="-qt-paragraph-type:empty; margin-top:0px;
        margin-bottom:0px; margin-left:0px; margin-right:0px;
        -qt-block-indent:0; text-indent:0px; "> </p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;"><span style=" font-family:'Courier
          New,courier';">This could print something useful. Another
          thing that might have broken a2dp could be pulseaudio - IIRC
          we were not using it in older releases where it was working.
          So maybe it would be worth to disable pulseaudio somehow and
          try without it. You could also try to make A2DP working with
          pulseaudio - google "a2dp pulseaudio" should help here.</span></p>
      <p style="-qt-paragraph-type:empty; margin-top:0px;
        margin-bottom:0px; margin-left:0px; margin-right:0px;
        -qt-block-indent:0; text-indent:0px; "> </p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;"><span style=" font-family:'Courier
          New,courier';">Regards</span></p>
      <p style="-qt-paragraph-type:empty; margin-top:0px;
        margin-bottom:0px; margin-left:0px; margin-right:0px;
        -qt-block-indent:0; text-indent:0px; "> </p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;"><span style=" font-family:'Courier
          New,courier';">Radek</span></p>
      <p style="-qt-paragraph-type:empty; margin-top:0px;
        margin-bottom:0px; margin-left:0px; margin-right:0px;
        -qt-block-indent:0; text-indent:0px; "> </p>
      <p style="-qt-paragraph-type:empty; margin-top:0px;
        margin-bottom:0px; margin-left:0px; margin-right:0px;
        -qt-block-indent:0; text-indent:0px; "> </p>
      <p style="-qt-paragraph-type:empty; margin-top:0px;
        margin-bottom:0px; margin-left:0px; margin-right:0px;
        -qt-block-indent:0; text-indent:0px; "> </p>
    </blockquote>
    Thanks Radek, I tried it again,<br>
    <br>
    as soon as I connect to headset by using "A2DP"- profile and setting
    bluetooth as default output device, this file is created:<br>
    ------------------------------------<br>
    root@snrgta04:/home/root# cat .asoundrc<br>
    # /org/bluez/1857/hci0/dev_C8_8B_47_01_xx_xx<br>
    pcm.!default {<br>
       type plug<br>
       slave.pcm "bluetooth"<br>
    }<br>
    <br>
    ctl.mixer0 {<br>
       type hw<br>
       card 0<br>
    }<br>
    <br>
    pcm.bluetooth {<br>
           type bluetooth<br>
           device "C8_8B_47_01_xx_xx"<br>
           profile "auto"<br>
    }<br>
    <br>
    ------------------------------------<br>
    Seems to be ok, except the underscores instead of ":" in bluetooth
    address. Not sure, if does matter?<br>
    <br>
    Then I tried mplayer again and with ". /opt/qtmoko/qpe.env" before
    mplayer command it is playing now. But I can not hear anything. If I
    start mplayer without "device"- option, the speaker is playing the
    song! So which control in alsamixer is associated with my headset? I
    treid to mute/unmute and raise volume in alsamixer with every
    control slider, without sound out of my headset.<br>
    <br>
    ---------------------------------------<br>
    root@snrgta04:~# mplayer -ao alsa:device=bluetooth
    Documents/audio/x-wav/06\ -\ Shut\ Up.mp3 <br>
    MPlayer svn r34540 (Debian), built with gcc-4.6 (C) 2000-2012
    MPlayer Team<br>
    mplayer: could not connect to socket<br>
    mplayer: No such file or directory<br>
    Failed to open LIRC support. You will not be able to use your remote
    control.<br>
    Playing Documents/audio/x-wav/06 - Shut Up.mp3.<br>
    libavformat version 53.21.1 (external)<br>
    Mismatching header version 53.19.0<br>
    Audio only file format detected.<br>
    Clip info:<br>
     Title: Shut Up (feat. Duece Poppito o<br>
     Artist: Trick Daddy<br>
     Album: Book Of Thugs: Chapter A.K., V<br>
     Year: <br>
     Comment: <br>
     Track: 6<br>
     Genre: Rap<br>
    Load subtitles in Documents/audio/x-wav/<br>
==========================================================================<br>
    Requested audio codec family [mpg123] (afm=mpg123) not available.<br>
    Enable it at compilation.<br>
    Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders<br>
    libavcodec version 53.35.0 (external)<br>
    Mismatching header version 53.32.2<br>
    AUDIO: 44100 Hz, 2 ch, floatle, 183.4 kbit/6.50% (ratio:
    22921->352800)<br>
    Selected audio codec: [ffmp3float] afm: ffmpeg (FFmpeg MPEG layer-3
    audio)<br>
==========================================================================<br>
    [AO_ALSA] Format floatle is not supported by hardware, trying
    default.<br>
    AO: [alsa] 44100Hz 2ch s16le (2 bytes per sample)<br>
    Video: no video<br>
    Starting playback...<br>
    A:   0.3 (00.3) of 262.0 (04:22.0) ??,?% <br>
    <br>
    ---------------------------------------<br>
    <br>
    the syslog tells me this:<br>
    -----------------------------------<br>
    May 15 22:30:34 snrgta04 kernel: [ 5839.499237] input:
    C8:8B:47:01:13:AA as /devices/virtual/input/input8<br>
    May 15 22:30:47 snrgta04 pulse.sh: I: [pulseaudio] client.c: Created
    6 "Native client (UNIX socket client)"<br>
    May 15 22:30:47 snrgta04 pulse.sh: I: [pulseaudio] client.c: Freed 6
    "Native client (UNIX socket client)"<br>
    May 15 22:30:47 snrgta04 pulse.sh: I: [pulseaudio]
    protocol-native.c: Connection died.<br>
    -----------------------------------<br>
    <br>
    Result: Silence! Sorry!<br>
    <br>
    What type of bluetooth device did You use for testing? Speaker or
    headset (with/without mic)?<br>
    <pre class="moz-signature" cols="72">-- 
Kind regards

Sebastian Reinhardt

</pre>
  </body>
</html>