Order of the Butterfly
Posts: 158 from 2019/4/6
@zukow
I don't know how to answer your question. I don't have the preparation to do it,
but the author told me it could be a usb1.1 problem since i use usb 2.0 3.0 ports,
I followed some advice from the author of qemu-ppc for -sam460ex -g4 -pegasos2
the author does not have a usb-audio stick at the moment to do my own tests.
where the principle to follow should be this:
complete control over the USB-audio stick by the host to passthrough the device.
and also on usbhid the hardest part
with this I take full control of the usb-audio:
UDEV
ACTION == "add", SUBSYSTEM == "usb", ATTR {idVendor} == "0d8c", ATTR {idProduct} == "0014", OWNER = "white"
ATTRS {idVendor} == "0d8c", ATTRS {idProduct} == "0014", ENV {PULSE_IGNORE} = "1", OWNER = "white"
BLACKLIST
blacklist snd_usb_audio
blacklist snd_usb_midi_lib
the hardest part is usbhid where in reality I can't find any solution to prevent it from talking to usb-audio.
a solution looked like this:
for device in $(ls /sys/bus/usb/devices/*/product); do echo $device;cat $device;done
USB Audio Device
/sys/bus/usb/devices/1-6/product
sudo dmesg
39.108362] usb 1-3: New USB device found, idVendor=0d8c, idProduct=0014, bcdDevice= 1.00
[ 39.108367] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 39.108368] usb 1-3: Product: USB Audio Device
[ 39.108369] usb 1-3: Manufacturer: C-Media Electronics Inc.
[ 39.128456] input: C-Media Electronics Inc. USB Audio Device as /devices/pci0000:00/0000:00:01.2/0000:01:00.0/usb1/1-3/1-3:1.3/0003:0D8C:0014.0007/input/input26
[ 39.185488] hid-generic 0003:0D8C:0014.0007: input,hidraw6: USB HID v1.00 Device [C-Media Electronics Inc. USB Audio Device] on usb-0000:01:00.0-3/input3
[ 39.190685] mc: Linux media interface: v0.10
[ 39.265052] cmedia_hs100b 0003:0D8C:0014.0007: Fixing CMedia HS-100B report descriptor
[ 39.265106] input: C-Media Electronics Inc. USB Audio Device as /devices/pci0000:00/0000:00:01.2/0000:01:00.0/usb1/1-3/1-3:1.3/0003:0D8C:0014.0007/input/input27
[ 39.325008] cmedia_hs100b 0003:0D8C:0014.0007: input,hidraw6: USB HID v1.00 Device [C-Media Electronics Inc. USB Audio Device] on usb-0000:01:00.0-3/input3
[ 39.379527] usbcore: registered new interface driver snd-usb-audio
echo '1-3' | sudo tee /sys/bus/usb/drivers/usb/unbind
1-3
before the test:
lsusb -t
/: Bus 06.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 10000M
/: Bus 05.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 480M
|__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 1: Dev 2, If 1, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 2: Dev 3, If 2, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 2: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 2: Dev 3, If 1, Class=Human Interface Device, Driver=usbhid, 12M
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 10000M
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 10000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/10p, 480M
|__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=ath9k_htc, 480M
|__ Port 3: Dev 6, If 2, Class=Audio, Driver=snd-usb-audio, 12M
|__ Port 3: Dev 6, If 0, Class=Audio, Driver=snd-usb-audio, 12M
|__ Port 3: Dev 6, If 3, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 3: Dev 6, If 1, Class=Audio, Driver=snd-usb-audio, 12M
|__ Port 6: Dev 3, If 2, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 6: Dev 3, If 0, Class=Vendor Specific Class, Driver=, 12M
|__ Port 7: Dev 4, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 1: Dev 5, If 0, Class=Vendor Specific Class, Driver=, 12M
after the test:
Bus 06.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 10000M
/: Bus 05.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 480M
|__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 1: Dev 2, If 1, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 2: Dev 3, If 2, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 2: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 2: Dev 3, If 1, Class=Human Interface Device, Driver=usbhid, 12M
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 10000M
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 10000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/10p, 480M
|__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=ath9k_htc, 480M
|__ Port 6: Dev 3, If 2, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 6: Dev 3, If 0, Class=Vendor Specific Class, Driver=, 12M
|__ Port 7: Dev 4, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 1: Dev 5, If 0, Class=Vendor Specific Class, Driver=, 12M
the driver is disassociated
but in the end it is useless because in this way as soon as I reinsert the usb-audio stick the usbhid regains control of it.
i can add the log i get as soon as i remove the qemu usb-audio only the initial lines in this case else it is much longer ..
I have no idea what they are I guess Morphos is not finding something or that he is taking action while I remove the USB-audio
in summary these are the principles that the author recommended to me.
but this .log I don't know if it can be useful for the purpose that I have not yet sent to the author.
StackFrame[ 0].LR[0x14cd4dc0] -> MOSSYS:LIBS/muimaster.library [Hunk 1 Offset 0x0001bac0]
StackFrame[ 1].LR[0x10351b98] -> intuition.library.elf [Hunk 0 Offset 0x00004b38 Function NewObjectA]
StackFrame[ 2].LR[0x16474cd8] -> System:MorphOS/Prefs/MPrefs/USB.mprefs [Hunk 1 Offset 0x00013200]
StackFrame[ 3].LR[0x1647bfc8] -> System:MorphOS/Prefs/MPrefs/USB.mprefs [Hunk 1 Offset 0x0001a4f0]
StackFrame[ 4].LR[0x14cd4dc0] -> MOSSYS:LIBS/muimaster.library [Hunk 1 Offset 0x0001bac0]
StackFrame[ 5].LR[0x14ce08c4] -> MOSSYS:LIBS/muimaster.library [Hunk 1 Offset 0x000275c4]
StackFrame[ 6].LR[0x14ce7d04] -> MOSSYS:LIBS/muimaster.library [Hunk 1 Offset 0x0002ea04]
StackFrame[ 7].LR[0x14cebfec] -> MOSSYS:LIBS/muimaster.library [Hunk 1 Offset 0x00032cec]
StackFrame[ 8].LR[0x14ce9484] -> MOSSYS:LIBS/muimaster.library [Hunk 1 Offset 0x00030184]
StackFrame[ 9].LR[0x14d5df98] -> MOSSYS:LIBS/muimaster.library [Hunk 1 Offset 0x000a4c98]
StackFrame[10].LR[0x14d51a40] -> MOSSYS:LIBS/muimaster.library [Hunk 1 Offset 0x00098740]
StackFrame[11].LR[0x14d4988c] -> MOSSYS:LIBS/muimaster.library [Hunk 1 Offset 0x0009058c]
StackFrame[12].LR[0x14d5df98] -> MOSSYS:LIBS/muimaster.library [Hunk 1 Offset 0x000a4c98]
StackFrame[13].LR[0x1647c69c] -> System:MorphOS/Prefs/MPrefs/USB.mprefs [Hunk 1 Offset 0x0001abc4]
StackFrame[14].LR[0x14cd4dc0] -> MOSSYS:LIBS/muimaster.library [Hunk 1 Offset 0x0001bac0]
StackFrame[15].LR[0x103d3c68] -> intuition.library.elf [Hunk 0 Offset 0x00086c08]
StackFrame[16].LR[0x10353e4c] -> intuition.library.elf [Hunk 0 Offset 0x00006dec Function SetAttrsA]
StackFrame[17].LR[0x14d60ea8] -> MOSSYS:LIBS/muimaster.library [Hunk 1 Offset 0x000a7ba8 Function ???VarArgs]
StackFrame[18].LR[0x14d14864] -> MOSSYS:LIBS/muimaster.library [Hunk 1 Offset 0x0005b564]
StackFrame[19].LR[0x14d5df98] -> MOSSYS:LIBS/muimaster.library [Hunk 1 Offset 0x000a4c98]
StackFrame[20].LR[0x103d3c68] -> intuition.library.elf [Hunk 0 Offset 0x00086c08]
StackFrame[21].LR[0x10353e4c] -> intuition.library.elf [Hunk 0 Offset 0x00006dec Function SetAttrsA]
StackFrame[22].LR[0x14d60ea8] -> MOSSYS:LIBS/muimaster.library [Hunk 1 Offset 0x000a7ba8 Function ???VarArgs]
StackFrame[23].LR[0x14d534ac] -> MOSSYS:LIBS/muimaster.library [Hunk 1 Offset 0x0009a1ac]
StackFrame[24].LR[0x14d49984] -> MOSSYS:LIBS/muimaster.library [Hunk 1 Offset 0x00090684]
StackFrame[25].LR[0x14d5df98] -> MOSSYS:LIBS/muimaster.library [Hunk 1 Offset 0x000a4c98]
StackFrame[26].LR[0x14d5e0e8] -> MOSSYS:LIBS/muimaster.library [Hunk 1 Offset 0x000a4de8]
StackFrame[27].LR[0x14cff154] -> MOSSYS:LIBS/muimaster.library [Hunk 1 Offset 0x00045e54]
StackFrame[28].LR[0x14cff368] -> MOSSYS:LIBS/muimaster.library [Hunk 1 Offset 0x00046068]
StackFrame[29].LR[0x14d01fc0] -> MOSSYS:LIBS/muimaster.library [Hunk 1 Offset 0x00048cc0]
StackFrame[30].LR[0x14cf6fdc] -> MOSSYS:LIBS/muimaster.library [Hunk 1 Offset 0x0003dcdc]
>>> ABox State
----------------------------------------------------------------------
ExecBase: SysBase 0x140019b0
SysFlags 0x8000 AttnResched 0x0000 IDNestCnt -1 TDNestCnt -1
ThisTask 0x168a4780 TaskReady 0x1404af88 TaskWait 0x14029fa8
ResModules 0x140040a0
TaskTrapCode 0x101217bc TaskExceptCode 0x101217c4 TaskExitCode 0x10121820
TaskSigAlloc 0xffff TaskTrapAlloc 0x8000
IdleCount 4467 DispCount 133664
Quantum 4 Elapsed 2
VBlankFrequency 50 PowerSupplyFrequency 50 EClockFrequency 709379
MainTID 0x10020010 SchedulerTID 0x10020012 SchedulerSig 0x80000000
OldSRR0 0x0
ConfigServerTID 0x10000013
LastIntObject 0x140c48a4
LastIntObject 0x140c48a4 <Not Valid ptr>
Code 0x1047d4c4 Data 0x1409ab68
Int0: iv_Code 0x00000000 iv_Data 0x00000000 iv_Node 0x00000000
Int1: iv_Code 0x00000000 iv_Data 0x00000000 iv_Node 0x00000000
Int2: iv_Code 0x00000000 iv_Data 0x00000000 iv_Node 0x00000000
Int3: iv_Code 0x10126ccc iv_Data 0x14003c38 iv_Node 0x00000000
Int4: iv_Code 0x10126ccc iv_Data 0x14003c58 iv_Node 0x00000000
Int5: iv_Code 0x10126ccc iv_Data 0x14003c48 iv_Node 0x00000000
Interrupt 0x1403446e <graphics.library>
Code 0x10198508 Data 0x14034424
Interrupt 0x144caf20 <ixemul timer interrupt>
Code 0x144c80cc Data 0x00000000
Int6: iv_Code 0x10198510 iv_Data 0x14034424 iv_Node 0x1403449a
Int7: iv_Code 0x00000000 iv_Data 0x00000000 iv_Node 0x00000000
Int8: iv_Code 0x00000000 iv_Data 0x00000000 iv_Node 0x00000000
Int9: iv_Code 0x00000000 iv_Data 0x00000000 iv_Node 0x00000000
Int10: iv_Code 0x00000000 iv_Data 0x00000000 iv_Node 0x00000000
Int11: iv_Code 0x00000000 iv_Data 0x00000000 iv_Node 0x00000000
Int12: iv_Code 0x00000000 iv_Data 0x00000000 iv_Node 0x00000000
Int13: iv_Code 0x10126ccc iv_Data 0x14003c68 iv_Node 0x00000000
Int14: iv_Code 0x00000000 iv_Data 0x00000000 iv_Node 0x00000000
Int15: iv_Code 0x10126ccc iv_Data 0x14003c78 iv_Node 0x00000000
>>> Running Task
etc.
I apologize for this long message,
Thank you.
[ Edited by white 05.02.2022 - 20:06 ]