scream icon indicating copy to clipboard operation
scream copied to clipboard

Pulseaudio Retriever doesnt work.

Open mathew2214 opened this issue 4 years ago • 10 comments

my scream from my VM is on /dev/uio1 i have made user my user has rwx access to /dev/uio1 but the command "scream -v -m /dev/uio1" yields: Using Pulseaudio output Starting IVSHMEM receiver Failed to map the shared memory file: /dev/uio1

mathew2214 avatar Oct 09 '20 16:10 mathew2214

What's the size of /dev/uio1 ? Are you sure it is the shared memory? Can you share the VM xml or command line? At least the IVSHMEM part.

martinellimarco avatar Oct 09 '20 20:10 martinellimarco

FULL XML dumps: https://gist.github.com/mathew2214/71ec9003650b83e35e1d3f3ef1e5b80a TESSA3 is the Windows sending-vm, TESSA1 is the Linux receiving VM. relevant parts:

TESSA3(Sending) IVSHMEM:
   <shmem name='looking-glass'>
      <model type='ivshmem-plain'/>
      <size unit='M'>32</size>
      <alias name='shmem0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </shmem>
    <shmem name='scream-ivshmem'>
      <model type='ivshmem-plain'/>
      <size unit='M'>2</size>
      <alias name='shmem1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0c' function='0x0'/>
    </shmem>

TESSA1 (Receiving) IVSHMEM:
  <shmem name='looking-glass'>
      <model type='ivshmem-plain'/>
      <size unit='M'>32</size>
      <alias name='shmem0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </shmem>
    <shmem name='scream-ivshmem'>
      <model type='ivshmem-plain'/>
      <size unit='M'>2</size>
      <alias name='shmem1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0c' function='0x0'/>
    </shmem>

it may be worth noting that my Looking glass setup works flawlessly, so i doubt its some syntax error with my IVSHMEM blocks. also: scream works as intended when i undo the registry entry that switches scream to IVSHMEM.

mathew2214 avatar Oct 12 '20 13:10 mathew2214

Oh, I see the issue now.

You are trying to send and receive between 2 VMs but that's something I never tested.

Usually it's used to send audio from a windows VM to the linux system below.

That said I think it may work in your setup if you use this in the receiving VM.

scream -v -m /sys/devices/pci0000:00/0000:00:0c.0/resource2_wc

Verify the pci path with lspci and please report if it works or not, I'm really curious.

martinellimarco avatar Oct 12 '20 15:10 martinellimarco

i still get Failed to map the shared memory file: /sys/devices/pci0000:00/0000:00:0c.0/resource2_wc

mathew2214 avatar Oct 13 '20 15:10 mathew2214

What's the output of lspci -vv from the receiving VM?

martinellimarco avatar Oct 13 '20 18:10 martinellimarco

full output of lspci -vv : https://gist.github.com/mathew2214/e919c83cfb772a47b4d49551b79af7b6

Relevant section

00:0c.0 RAM memory: Red Hat, Inc. Inter-VM shared memory (rev 01)
        Subsystem: Red Hat, Inc. QEMU Virtual Machine
        Physical Slot: 12
        Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Region 0: Memory at c0084000 (32-bit, non-prefetchable) [size=256]
        Region 2: Memory at 1012200000 (64-bit, prefetchable) [size=2M]
        Kernel driver in use: kvmfr
        Kernel modules: virtio_pci, kvmfr

mathew2214 avatar Oct 14 '20 14:10 mathew2214

Kernel driver in use: kvmfr If I'm not mistaken this is looking glass driver (kvm frame relay) so this ivshmem is not using the standard driver.

I suggest you to switch to the network version to avoid conflicts.

martinellimarco avatar Oct 14 '20 15:10 martinellimarco

is virtio_pci the correct driver to attempt use with scream? if so, i should be able to just add a modprobe config to force the correct driver to load on the scream device.

mathew2214 avatar Oct 14 '20 15:10 mathew2214

Yes, it should be that.

martinellimarco avatar Oct 14 '20 15:10 martinellimarco

Please discourage this use of Scream. QEMU has a Jack audio dev as of 5.1 that can be used to do this and more using standard HDA audio devices. This is not only more performant but far more powerful and avoids the need to do anything special in the guest VMs.

gnif avatar Oct 14 '20 17:10 gnif