<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>1683</bug_id>
          
          <creation_ts>2011-10-17 06:35:59 +0000</creation_ts>
          <short_desc>Enable sound for qemux86</short_desc>
          <delta_ts>2016-09-15 04:17:43 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>BSPs</product>
          <component>bsps-oe-core</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugzilla.yoctoproject.org/show_bug.cgi?id=3528</see_also>
    
    <see_also>https://bugzilla.yoctoproject.org/show_bug.cgi?id=1018</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Low</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>Future</target_milestone>
          <dependson>4827</dependson>
          <blocked>1018</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Paul Eggleton">bluelightning</reporter>
          <assigned_to name="Robert Yang">liezhi.yang</assigned_to>
          <cc>alexandru.c.georgescu</cc>
    
    <cc>dvhart</cc>
    
    <cc>holger.behrens</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>sgw</cc>
          
          <qa_contact name="Alexandru Georgescu">alexandru.c.georgescu</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>16891</commentid>
    <comment_count>0</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2011-10-17 06:35:59 +0000</bug_when>
    <thetext>It would be useful if sound was enabled by default by the runqemu script. To enable sound manually I found I needed to do three things:

1) export QEMU_AUDIO_DRV=alsa (otherwise it defaults to oss, which is not available by default on my Ubuntu system)

2) Add qemuparams=&quot;-soundhw all&quot; to runqemu command line (you can select drivers more specifically, but given there are only three supported drivers I don&apos;t think it matters)

3) modprobe snd-ens1370 within the running system - apparently we already install the appropriate kernel module, we just need to auto-load it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17216</commentid>
    <comment_count>1</comment_count>
      <attachid>280</attachid>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2011-11-15 13:28:04 +0000</bug_when>
    <thetext>Created attachment 280
Patch 1 to enable sound</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17217</commentid>
    <comment_count>2</comment_count>
      <attachid>281</attachid>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2011-11-15 13:28:31 +0000</bug_when>
    <thetext>Created attachment 281
Patch 2 to enable sound</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17218</commentid>
    <comment_count>3</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2011-11-15 13:30:19 +0000</bug_when>
    <thetext>I tried this (patches attached). I ran into the complexity of my system running pulseaudio. To make this work we&apos;d need to enable pulseaudio in qemu-native/nativesdk by building pulseaudio as a dependency for qemu.

We could really use a way to turn these features on/off in the qemu script.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17220</commentid>
    <comment_count>4</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2011-11-15 14:23:08 +0000</bug_when>
    <thetext>Surely you don&apos;t *need* pulseaudio support in an application just to play sound with it installed? I was under the impression it provided a standard ALSA interface.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17222</commentid>
    <comment_count>5</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2011-11-15 15:26:30 +0000</bug_when>
    <thetext>Running qemu complained my alsa device was locked, presumably by pulseaudio which was active on the system. Qemu also has a pulseaudio specific backend...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>41548</commentid>
    <comment_count>6</comment_count>
    <who name="Cristian Iorga">cristian.iorga</who>
    <bug_when>2014-03-20 15:19:15 +0000</bug_when>
    <thetext>Using pulseaudio as the audio backend for qemu works, however, it is my understanding that not all Linux distros rely on pulseaudio server for audio services. This would basically mean, at a minimal level, to detect at runtime (runqemu) which audio server is used (pa, alsa, oss) and set qccordingly qemu.
Another issue that needs to get solved is that sound from guest machines is muted while using qemu&apos;s pulseaudio backend. This also needs to get fixed.
Finally, a little bit of cleanup needs to be performed in qemu scripts (runqemu).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44887</commentid>
    <comment_count>7</comment_count>
    <who name="Stephen K Jolley">sjolley.yp.pm</who>
    <bug_when>2014-07-31 15:26:23 +0000</bug_when>
    <thetext>*** Bug 5602 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66181</commentid>
    <comment_count>8</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2016-09-15 04:17:43 +0000</bug_when>
    <thetext>Now the audio support is controlled by bsp, it can set QB_AUDIO_DRV, QB_AUDIO_DRV and QB_AUDIO_OPT, see meta/classes/qemuboot.bbclass for more info.

Merged into master:
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=b405712414de98cba3a645601419aceb32d52f02

And qemux86, qemux86-64&apos;s sound support had been done.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>280</attachid>
            <date>2011-11-15 13:28:04 +0000</date>
            <delta_ts>2011-11-15 13:28:04 +0000</delta_ts>
            <desc>Patch 1 to enable sound</desc>
            <filename>b3fecd8c5b20230e6f2005362b8bc30b5b2b025b.patch</filename>
            <type>text/plain</type>
            <size>1119</size>
            <attacher name="Richard Purdie">richard.purdie</attacher>
            
              <data encoding="base64">RnJvbSBiM2ZlY2Q4YzViMjAyMzBlNmYyMDA1MzYyYjhiYzMwYjViMmIwMjViIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBSaWNoYXJkIFB1cmRpZSA8cmljaGFyZC5wdXJkaWVAbGludXhm
b3VuZGF0aW9uLm9yZz4KRGF0ZTogVHVlLCAxNSBOb3YgMjAxMSAyMTowNToxNCArMDAwMApTdWJq
ZWN0OiBydW5xZW11LWludGVybmFsOiBJZiBhbiBBTFNBIHNvdW5kIGNhcmQgaXMgcHJlc2VudCwg
dXNlIGl0CgpTaWduZWQtb2ZmLWJ5OiBSaWNoYXJkIFB1cmRpZSA8cmljaGFyZC5wdXJkaWVAbGlu
dXhmb3VuZGF0aW9uLm9yZz4KLS0tCmRpZmYgLS1naXQgYS9zY3JpcHRzL3J1bnFlbXUtaW50ZXJu
YWwgYi9zY3JpcHRzL3J1bnFlbXUtaW50ZXJuYWwKaW5kZXggMjk2OGVkOS4uZDFiYzZiMSAxMDA3
NTUKLS0tIGEvc2NyaXB0cy9ydW5xZW11LWludGVybmFsCisrKyBiL3NjcmlwdHMvcnVucWVtdS1p
bnRlcm5hbApAQCAtMzExLDYgKzMxMSwxNCBAQCBmaQogaWYgWyAiJE1BQ0hJTkUiID0gInFlbXV4
ODYiIF07IHRoZW4KICAgICBRRU1VPXFlbXUKICAgICBRRU1VX1VJX09QVElPTlM9IiRRRU1VX1VJ
X09QVElPTlMgLXZnYSB2bXdhcmUgLWVuYWJsZS1nbCIKKyAgICBpZiBbIC1kIC9wcm9jL2Fzb3Vu
ZCBdICYmICEgZ3JlcCAtbCAibm8gc291bmRjYXJkcyIgL3Byb2MvYXNvdW5kL2NhcmRzOyB0aGVu
CisgICAgICAgIGlmIHBpZG9mIHB1bHNlYXVkaW87IHRoZW4KKyAgICAgICAgICAgIGV4cG9ydCBR
RU1VX0FVRElPX0RSVj1wYQorICAgICAgICBlbHNlCisgICAgICAgICAgICBleHBvcnQgUUVNVV9B
VURJT19EUlY9YWxzYQorICAgICAgICBmaQorICAgICAgICBRRU1VX1VJX09QVElPTlM9IiRRRU1V
X1VJX09QVElPTlMgLXNvdW5kaHcgYWxsIgorICAgIGZpCiAgICAgaWYgWyAiJEZTVFlQRSIgPSAi
ZXh0MyIgLW8gIiRGU1RZUEUiID0gImJ0cmZzIiBdOyB0aGVuCiAgICAgICAgIEtFUk5DTURMSU5F
PSJ2Z2E9MCByb290PS9kZXYvaGRhIHJ3IG1lbT0kUUVNVV9NRU1PUlkgJEtFUk5FTF9ORVRXT1JL
X0NNRCIKICAgICAgICAgUUVNVU9QVElPTlM9IiRRRU1VX05FVFdPUktfQ01EIC1oZGEgJFJPT1RG
UyAkUUVNVV9VSV9PUFRJT05TIgotLQpjZ2l0IDAuOS4wLjEK
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>281</attachid>
            <date>2011-11-15 13:28:31 +0000</date>
            <delta_ts>2011-11-15 13:28:31 +0000</delta_ts>
            <desc>Patch 2 to enable sound</desc>
            <filename>b8424348403bede4740589bc33778fa9d6a13bef.patch</filename>
            <type>text/plain</type>
            <size>634</size>
            <attacher name="Richard Purdie">richard.purdie</attacher>
            
              <data encoding="base64">RnJvbSBiODQyNDM0ODQwM2JlZGU0NzQwNTg5YmMzMzc3OGZhOWQ2YTEzYmVmIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBSaWNoYXJkIFB1cmRpZSA8cmljaGFyZC5wdXJkaWVAbGludXhm
b3VuZGF0aW9uLm9yZz4KRGF0ZTogVHVlLCAxNSBOb3YgMjAxMSAyMTowNDo1NCArMDAwMApTdWJq
ZWN0OiBxZW11eDg2OiBFbmFibGUgYXV0b2xvYWRpbmcgb2Ygc291bmQgbW9kdWxlCgpTaWduZWQt
b2ZmLWJ5OiBSaWNoYXJkIFB1cmRpZSA8cmljaGFyZC5wdXJkaWVAbGludXhmb3VuZGF0aW9uLm9y
Zz4KLS0tCmRpZmYgLS1naXQgYS9tZXRhL2NvbmYvbWFjaGluZS9xZW11eDg2LmNvbmYgYi9tZXRh
L2NvbmYvbWFjaGluZS9xZW11eDg2LmNvbmYKaW5kZXggNzVjOTA0Mi4uYmNmYzlkNiAxMDA2NDQK
LS0tIGEvbWV0YS9jb25mL21hY2hpbmUvcWVtdXg4Ni5jb25mCisrKyBiL21ldGEvY29uZi9tYWNo
aW5lL3FlbXV4ODYuY29uZgpAQCAtMzAsMyArMzAsNCBAQCBHTElCQ19FWFRSQV9PRUNPTkYgPSAi
LS13aXRoLXRscyIKIAogTUFDSElORV9FU1NFTlRJQUxfRVhUUkFfUkRFUEVORFMgKz0gInY4NmQi
CiAKK21vZHVsZV9hdXRvbG9hZF9zbmQtZW5zMTM3MCA9ICJzbmQtZW5zMTM3MCIKLS0KY2dpdCAw
LjkuMC4xCg==
</data>

          </attachment>
      

    </bug>

</bugzilla>