MorphOS runs on QEmu
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    polluks
    Posts: 780 from 2007/10/23
    From: Gelsenkirchen,...
    @Georg
    It may depend on the RTC which is independent of the speed.
    Pegasos II G4: MorphOS 3.9, Zalman M220W · iMac G5 12,1 17", MorphOS 3.18
    Power Mac G3: OSX 10.3 · PowerBook 5,8: OSX 10.5, MorphOS 3.18
  • »28.09.21 - 17:33
    Profile
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Georg
    Posts: 106 from 2004/4/7
    The emulator can lie about everything if it wants to. Depending on what user wants to do inside the emulated OS, he may not care about whether anything time related inside the emulation matches real world or not.
  • »28.09.21 - 17:47
    Profile
  • MorphOS Developer
    jacadcaps
    Posts: 2995 from 2003/3/5
    From: Canada
    Quote:

    The emulator can lie about everything if it wants to.


    Which is precisely why we are not allowing QEmu registrations.
  • »28.09.21 - 20:13
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    Posts: 158 from 2019/4/6
    @All
    Today I wanted to go back to qemu, to pass some time.

    Now qemu sam460ex (morphos) recognizes the audio-usb-stick without any blocking.
    It also allows you to choose it as an audio device and save it.
    The only problem is that no sound is heard afterwards.

    Same thing for sam460ex (ArosPPC) everything is regularly recognized.

    My question is:
    in reality there is a driver for sam460ex audio-usb Morphos side?
    or is there just the original sam460ex sound chip driver without support for a sam460ex audio-usb in real hardware?
    this information would be very useful to understand if it still doesn't work or at this point a driver written for sam460ex is missing for the USB-audio with Morphos?

    Thank you. :-)
  • »29.01.22 - 17:11
    Profile
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Andreas_Wolf
    Posts: 12085 from 2003/5/22
    From: Germany
    > there is a driver for sam460ex audio-usb Morphos side? or is there
    > just the original sam460ex sound chip driver without support for a
    > sam460ex audio-usb in real hardware? […] a driver written for
    > sam460ex is missing for the USB-audio with Morphos?

    MorphOS 3.10 introduced USB audio support, regardless of hardware platform, so no reason why it shouldn't work on real Sam460. Note that MorphOS probably only supports USB Audio specification 1.0, not 2.0 or later.
    MorphOS Library has a list of tested USB audio devices.
  • »29.01.22 - 19:07
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    Posts: 158 from 2019/4/6
    @Andreas_Wolf
    The usb-audio stick is among those compatible in the list and:
    "c-media electronics"
    I made a short video where you can see that everything is recognized but the sound is not reproduced.
    Maybe it can help others who may be interested in it.

    here the video of a few minutes:
    https://we.tl/t-LMxlsyj9tt
  • »29.01.22 - 21:06
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    Posts: 158 from 2019/4/6
    In summary what I'm trying to do is this:

    lsmod

    snd_usb_audio 356 352 0
    snd_usbmidi_lib 45056 1 snd_usb_audio
    snd_rawmidi 45056 1 snd_usbmidi_lib
    mc 65536 1 snd_usb_audio

    because something seems to work but I still can't understand the right procedure is always if this exists

    then example:
    sudo modprobe -f snd_usb_audio
    and so on:
    sudo modprobe -f snd_usbmidi_lib

    some of these loaded modules conflict with the following error:
    qemu-system-ppc: libusb_release_interface: -4 [NO_DEVICE]

    But not always
    I can also avoid it

    but this involves the freezing of Morphos and therefore I cannot complete the saving of the peripheral.

    I will try other solutions
    If anyone is interested any suggestions would be nice :-)

    I still don't know Morphos well to see this

    the saving of my real hardware with the usb-audio stick where do I find it once I have configured my PowerBook with the usb-audio stick in Morphos?

    Thank you. :-)


    [ Edited by white 30.01.2022 - 21:29 ]
  • »30.01.22 - 21:20
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    Posts: 158 from 2019/4/6
    Here is the test carried out on Sam460ex with ArosPPC,

    here too the usb-audio stick is recognized by Poseidon
    but even in this case no sound is heard.

    https://we.tl/t-dIoDLeN0Dv

    separate note:
    these are the two usb-audio sticks that I am using for the tests
    both are recognized on real hardware with Morphos and work flawlessly.
    If it could be useful:

    Amazon:
    https://tinyurl.com/yaakns4p
    https://tinyurl.com/5n7ue6xd


    [ Edited by white 31.01.2022 - 12:27 ]
  • »31.01.22 - 07:43
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    Posts: 158 from 2019/4/6
    Here instead pegasos2 which now no longer crashes even with the usb-audio stick inserted.
    In this case the device is recognized as usb
    but not with exact specifications.

    (I have no idea if the controller ( VIA INTEL ALI etc. is the correct one )

    here the little test:

    https://we.tl/t-8g8a74FGN2
  • »31.01.22 - 23:19
    Profile
  • MorphOS Developer
    zukow
    Posts: 643 from 2005/2/9
    From: Poland
    You should contact author of this fix and tell him that it doesn't work very well :)

    2021-12-14 QEMU 6.2.0 is now available Fixed USB emulation and some small enhancements in pegasos2
  • »01.02.22 - 13:29
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    Posts: 158 from 2019/4/6
    @zukow,
    Hi,

    The fix I guess is due to the error
    libusb_release_interface: -4 [NO_DEVICE]
    which occurred before effectively blocking Morphos when the audio-usb was inserted
    and now it no longer occurs.

    For the rest I don't understand why those who develop qemu don't buy this:
    AMAZON:
    https://tinyurl.com/5n7ue6xd <---- 7.99 EUR

    and debug or something else.

    I have not used linux for 20 years and I do my best to spend a few hours of time.

    here the author's answer:
    It turns out there's a limitation in QEMU's OHCI emulation that likely causes problems for devices with multiple endpoints such as audio interfaces with buttons (like when you see both audio and hid classes attached to the USB device) or maybe audio interfaces in general so these likely won't work with machines using OHCI (eg mac99 and sam460ex) until somebody fixes this in the QEMU device emulation. (This was discussed on the qemu-devel list end of last year but I don't have a link now.)
    The pegasos2 uses a different USB controller (UHCI) which had a separate problem but I've fixed that in latest 6.2.0 version so you may try with that instead as it may work better or at least have better chnace of working than the known incomplete OHCI emulation. So if you're still interested, please test with the pegasos2 machine and let us know.

    for Pegasos 2 here are some tips from the author:
    You definitely don't have to do modprobe on your host OS, in fact you need to do the opposite and make sure NO driver is loaded by the host foir the device so the guest driver can fully control it. Otherwise host and guest drivers may both access it which will not work. Maybe try to do lshw as root on your host OS and check that the device is claimed by any driver then unload that driver with modprobe -r or rmmod and once it's unclaimed then try to use it from QEMU. If you cannot unload the driver because the audio device is opened by some service such as pulsaudio you may need to stop those first or better add an udev rule to ignore the device so when you plug it in no driver is loaded then the guest can use it excusively.

    In fact I have blacklisted the UDEV device and also disabled pulse on the usb-audio device
    but it doesn't seem to work.

    It's probably not clear to me what he means by the advice he probably gave me.
    Because the problem remains, the device is connected but in fact it is not seen as a usb-audio device as opposed to Sam460ex which actually recognizes it and saves the device but then the sound is not heard.

    Some idea?

    I always remain of the idea that if the thing is feasible, the purchase of the usb-audio stick by the developer is the best choice
    AMAZON:
    https://tinyurl.com/5n7ue6xd <---- 7.99 EUR
    :-)

    since there are,
    thank's for your job,
    I find Morphos a really nice system :-)

    [ Edited by white 01.02.2022 - 16:14 ]
  • »01.02.22 - 16:10
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    Posts: 158 from 2019/4/6
    I wanted to deepen the disabling of modules in the kernel of the usb-audio stick

    I believe it is the correct procedure
    here I put the whole procedure to disable kernel modules that are loaded at boot
    in this case a video is much more efficient in practical terms is faster where there are all the steps step by step

    disabling modules in the kernel:

    https://we.tl/t-23jL168zyf

    here instead the use of the usb-audio stick after the reboot with the modules disabled:

    https://we.tl/t-fDkXo0Nfb5

    I hope someone more experienced can possibly tell me if I have made any mistakes.

    Because the result does not change unfortunately the usb-audio stick is recognized in the same way with Pegasos2.

    Thanks again.
  • »02.02.22 - 11:25
    Profile
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Georg
    Posts: 106 from 2004/4/7
    Why do you want to get audio working through usb-audio stick? Isn't it easier to get it to work through qemu-emulated sound card for which Morphos has drivers? I doubt audio stick would end up working better even if MorphOS would directly speaking to hw instead of going through qemu, because on the other hand inside MorphOS there may be more overhead for running cpu code for usb stack and usb driver.
  • »05.02.22 - 08:10
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    Posts: 158 from 2019/4/6
    @Georg
    I just got the idea when I was using qemu with morphos and I wanted to move some data to do some tests
    then I tried to mount a usb stick that contained data
    with:
    -usb -device usb-host, vendorid = 0xeba4, productid = 0x7588

    in this case the pen is recognized by morphos and can be used without problems.

    So since there is no audio emulation in qemu

    I said then it should also recognize a usb-audio stick in the same way.

    but it actually seems more complicated than I thought.

    And every now and then I do tests to pass the time.

    Qemu does not currently support audio with morphos
    I can't tell you the reason for this. :-)
  • »05.02.22 - 12:44
    Profile
  • MorphOS Developer
    zukow
    Posts: 643 from 2005/2/9
    From: Poland
    Usb audio uses isochronous transfers, are you sure that qemu usb redirection supports it?
  • »05.02.22 - 17:11
    Profile Visit Website
  • Order of the Butterfly
    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 ]
  • »05.02.22 - 19:15
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    Posts: 158 from 2019/4/6
    I hope I'm not wrong
    but maybe i found the right command
    to get the ID

    lsusb -tv

    /: Bus 06.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 10000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
    /: Bus 05.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    |__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 12M
    ID 145f:02b9 Trust
    |__ Port 1: Dev 2, If 1, Class=Human Interface Device, Driver=usbhid, 12M
    ID 145f:02b9 Trust
    |__ Port 2: Dev 3, If 2, Class=Human Interface Device, Driver=usbhid, 12M
    ID 0b05:1899 ASUSTek Computer, Inc.
    |__ Port 2: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 12M
    ID 0b05:1899 ASUSTek Computer, Inc.
    |__ Port 2: Dev 3, If 1, Class=Human Interface Device, Driver=usbhid, 12M
    ID 0b05:1899 ASUSTek Computer, Inc.
    /: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 10000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
    /: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 10000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
    /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/10p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    |__ Port 3: Dev 6, If 2, Class=Audio, Driver=, 12M
    ID 0d8c:0014 C-Media Electronics, Inc. Audio Adapter (Unitek Y-247A)
    |__ Port 3: Dev 6, If 0, Class=Audio, Driver=, 12M
    ID 0d8c:0014 C-Media Electronics, Inc. Audio Adapter (Unitek Y-247A)
    |__ Port 3: Dev 6, If 3, Class=Human Interface Device, Driver=usbhid, 12M
    ID 0d8c:0014 C-Media Electronics, Inc. Audio Adapter (Unitek Y-247A)
    |__ Port 3: Dev 6, If 1, Class=Audio, Driver=, 12M
    ID 0d8c:0014 C-Media Electronics, Inc. Audio Adapter (Unitek Y-247A)
    |__ Port 6: Dev 3, If 2, Class=Human Interface Device, Driver=usbhid, 12M
    ID 0b05:1939 ASUSTek Computer, Inc.
    |__ Port 6: Dev 3, If 0, Class=Vendor Specific Class, Driver=, 12M
    ID 0b05:1939 ASUSTek Computer, Inc.
    |__ Port 7: Dev 4, If 0, Class=Hub, Driver=hub/4p, 480M
    ID 05e3:0610 Genesys Logic, Inc. Hub
    |__ Port 1: Dev 5, If 0, Class=Vendor Specific Class, Driver=, 12M
    ID 1b1c:0c08 Corsair

    I just have to create a UDEV rule for usbhid
    I believe it can be done

    if that is the purpose.

    Thanks for any help :-)

    [ Edited by white 05.02.2022 - 22:38 ]
  • »05.02.22 - 22:05
    Profile
  • MorphOS Developer
    jacadcaps
    Posts: 2995 from 2003/3/5
    From: Canada
    Quote:

    Georg wrote:
    Why do you want to get audio working through usb-audio stick? Isn't it easier to get it to work through qemu-emulated sound card for which Morphos has drivers?


    I am not aware of qemu being able to emulate any cards that MorphOS has drivers for.
  • »05.02.22 - 23:20
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    Posts: 158 from 2019/4/6
    ok :-)
    I give up

    using an "asus" motherboard I was convinced that I had identified the usbhid :-)

    going to see the individual components

    with:
    sudo lsusb -vvd 0b05: 1899

    it actually corresponds to the keyboard
    Bus 005 Device 003: ID 0b05: 1899 ASUSTek Computer, Inc. TUF GAMING K5
    Device Descriptor:
    bLength 18
    bDescriptorType 1
    bcdUSB 1.10
    bDeviceClass 0
    bDeviceSubClass 0
    bDeviceProtocol 0
    bMaxPacketSize0 64
    idVendor 0x0b05 ASUSTek Computer, Inc.
    idProduct 0x1899
    bcdDevice 0.45
    iManufacturer 1 ASUSTeK
    iProduct 2 TUF GAMING K5

    etc. etc.

    therefore completely wrong road.

    I remain of the idea that if the developer does not personally try a usb-audio stick to see how it works.

    Of course I personally can't do anything about it.

    I will dedicate myself to something else :-)

    it remains only that with qemu sam460ex the usb-audio stick is perfectly recognized in all its parts only problem is that you can't hear the sound.

    I would work on this, but it's not up to me.

    Well it was a nice pastime I learned other things. :-)

    [ Edited by white 06.02.2022 - 10:53 ]
  • »06.02.22 - 10:37
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    Templario
    Posts: 536 from 2012/4/28
    I have a doubt, How I can send lha/lzx files from Windows host to QEMU running MorphOS, because I can download files via Internet, but is there other way?
    Thanks.
  • »09.02.22 - 11:27
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    Posts: 158 from 2019/4/6
    @Templario
    Hi,
    Honestly not if it is possible to do it I do not use qemu to do many things.
    I guess you can mount real partitions but I've never tried.

    a simple way is to use a usb data stick like this with qemu:

    -usb -device usb-host,vendorid=0xeba4,productid=0x7588

    I don't use qemu with windows
    "usb deview" for windows should give you the right IDs

    download link usbdeview x64

    https://www.nirsoft.net/utils/usbdeview-x64.zip

    this is a quick solution move your files to the stick and then mount it with qemu.
  • »09.02.22 - 12:50
    Profile
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Georg
    Posts: 106 from 2004/4/7
    Quote:

    jacadcaps wrote:

    I am not aware of qemu being able to emulate any cards that MorphOS has drivers for.


    SB128 driver (https://github.com/aros-development-team/AROS/tree/master/workbench/devs/AHI/Drivers/SB128) sort of works with some problems (maybe driver bugs) with AROS PPC on Qemu PPC after some changes/hacks to QEMU's hw/audio/es1370.c. Port to MOS would probably take half an hour.

    QEMU hw/audio/es1370.c/es_write():

    Code:

    + val = bswap32(val); /* maybe the AHI driver is supposed to do that */
    addr = es1370_fixup (s, addr);


    QEMU hw/audio/es1370.c/es_read():

    Code:

    + val = bswap32(val); /* maybe the AHI driver is supposed to do that */
    return val;


    QEMU hw/audio/es1370.c/es_transfer_audio():

    Code:

    + if (1) { /* surely the AHI driver is supposed to do that */
    + unsigned short sample;
    + int ii;
    +
    + for(ii = 0; ii < to_copy / 2; ii++)
    + {
    + sample = ((unsigned short *)tmpbuf)[ii];
    + ((unsigned short *)tmpbuf)[ii] = bswap16(sample);
    + }
    + }

    copied = AUD_write (voice, tmpbuf, to_copy);


    It does not really work correctly but it makes the beep sound in AHI Prefs program when clicking Test button. But there are sometimes distortions. Sometimes it sounds correct. Maybe something with buffer underflow, interrupt problem. Don't know. Qemu x86 with AROS x86 with same SB128 driver has same sound problem.

    Normally when running AROS on qemu on Linux with PulseAudio, sound is muted with this driver. A workaround for AROS is to also activate the ac97 drive in qemu, not just the es1370 device. The ac97 AHI driver I guess does something in initialization that causes the sound to no longer be muted:

    Code:

    qemu-system-ppc .. .. -device ac97,audiodev=snd0 -device es1370,audiodev=snd0 -audiodev pa,id=snd0


    Another workaround is to build and run qemu-system-ppc with alsa driver (is by default notcompiled in). But sound distortions are worse compared to PulseAudio.

    Code:

    ./configure --target-list="ppc-softmmu" --audio-drv-list=pa,alsa

    ..

    qemu-system-ppc -audiodev alsa,id=snd0
  • »10.02.22 - 17:51
    Profile
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Georg
    Posts: 106 from 2004/4/7
    The AC97 driver (https://github.com/aros-development-team/AROS/tree/master/workbench/devs/AHI/Drivers/ac97) works too and works better than SB128 after similiar endianess hacks to QEMU's ac97.c:

    hw/audio/ac97.c/fetch_bd():

    Code:

    +#if 0
    r->bd.addr = le32_to_cpu (*(uint32_t *) &b[0]) & ~3;
    r->bd.ctl_len = le32_to_cpu (*(uint32_t *) &b[4]);
    +#else
    + r->bd.addr = be32_to_cpu (*(uint32_t *) &b[0]) & ~3;
    + r->bd.ctl_len = be32_to_cpu (*(uint32_t *) &b[4]);
    +#endif


    hw/audio/ac97.c/ac_97_io_nam_ops struct:

    Code:

    - .endianness = DEVICE_LITTE_ENDIAN,
    + .endianness = DEVICE_BIG_ENDIAN,


    hw/audio/ac97.c/ac97_io_nabm_ops struct:

    Code:

    - .endianness = DEVICE_LITTE_ENDIAN,
    + .endianness = DEVICE_BIG_ENDIAN,


    hw/audio/ac97.c/write_audio() before AUD_write() call:

    Code:

    {
    unsigned short sample;
    int ii;

    for(ii = 0; ii < to_copy / 2; ii++)
    {
    sample = ((unsigned short *)tmpbuf)[ii];
    ((unsigned short *)tmpbuf)[ii] = bswap16(sample);
    }
    }


    Code:

    ./qemu-system-ppc -machine sam460ex -rtc base=localtime -drive if=none,id=cd,file=aros-sam440-ppc.iso,format=raw -device ide-cd,drive=cd,bus=ide.1 -device ac97,audiodev=snd0 -audiodev pa,id=snd0
  • »11.02.22 - 08:51
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    matt3
    Posts: 665 from 2004/2/10
    Is QEmu a viable solution compared to a real Powerbook or Powermac? Can you drive multiple monitors?
  • »26.02.23 - 00:37
    Profile