Re: M2Tech HiFace Two and FreeBSD
On Sunday 02 September 2012 13:06:40 Roberth Sjonøy wrote: > Here you go, > > http://pastebin.com/LKT1LkNd > > Regards, > > Roberth Sjonøy Hi, I spent some time today to pull together USB AUDIO V2.0 support for FreeBSD. See: http://svn.freebsd.org/changeset/base/240078 The attached patch will update uaudio.c, but is not complete. Only mixer parsing is complete. Audio descriptors and sample rate selection is not complete. Can you see what you get when you load snd_uaudio after applying the attached patch + r240078 ? If you want to help out fix the remaining few bits and pieces feel free. They are all located inside "uaudio_chan_fill_info()" in uaudio.c ! --HPS === sys/dev/sound/usb/uaudio.c == --- sys/dev/sound/usb/uaudio.c (revision 240078) +++ sys/dev/sound/usb/uaudio.c (local) @@ -162,7 +162,6 @@ struct uaudio_softc *priv_sc; struct pcm_channel *pcm_ch; struct usb_xfer *xfer[UAUDIO_NCHANBUFS]; - const struct usb_audio_streaming_interface_descriptor *p_asid; const struct usb_audio_streaming_type1_descriptor *p_asf1d; const struct usb_audio_streaming_endpoint_descriptor *p_sed; const usb_endpoint_descriptor_audio_t *p_ed1; @@ -296,6 +295,26 @@ struct uaudio_terminal_node *root; }; +struct uaudio20_terminal_node { + union { + const struct usb_descriptor *desc; + const struct usb_audio20_clock_source_unit *csrc; + const struct usb_audio20_clock_selector_unit *csel; + const struct usb_audio20_clock_multiplier_unit *cmul; + const struct usb_audio20_input_terminal *it; + const struct usb_audio20_output_terminal *ot; + const struct usb_audio20_mixer_unit_0 *mu; + const struct usb_audio20_selector_unit *su; + const struct usb_audio20_feature_unit *fu; + const struct usb_audio20_sample_rate_unit *ru; + const struct usb_audio20_processing_unit_0 *pu; + const struct usb_audio20_extension_unit_0 *eu; + const struct usb_audio20_effect_unit *ef; + } u; + struct uaudio_search_result usr; + struct uaudio20_terminal_node *root; +}; + struct uaudio_format { uint16_t wFormat; uint8_t bPrecision; @@ -321,6 +340,31 @@ {0, 0, 0, NULL} }; +struct uaudio20_format { + uint32_t dwFormat; + uint8_t bPrecision; + uint32_t freebsd_fmt; + const char *description; +}; + +static const struct uaudio20_format uaudio20_formats[] = { + + {UA20_FMT_PCM8, 8, AFMT_U8, "8-bit U-LE PCM"}, + {UA20_FMT_PCM8, 16, AFMT_U16_LE, "16-bit U-LE PCM"}, + {UA20_FMT_PCM8, 24, AFMT_U24_LE, "24-bit U-LE PCM"}, + {UA20_FMT_PCM8, 32, AFMT_U32_LE, "32-bit U-LE PCM"}, + + {UA20_FMT_PCM, 8, AFMT_S8, "8-bit S-LE PCM"}, + {UA20_FMT_PCM, 16, AFMT_S16_LE, "16-bit S-LE PCM"}, + {UA20_FMT_PCM, 24, AFMT_S24_LE, "24-bit S-LE PCM"}, + {UA20_FMT_PCM, 32, AFMT_S32_LE, "32-bit S-LE PCM"}, + + {UA20_FMT_ALAW, 8, AFMT_A_LAW, "8-bit A-Law"}, + {UA20_FMT_MULAW, 8, AFMT_MU_LAW, "8-bit mu-Law"}, + + {0, 0, 0, NULL} +}; + #define UAC_OUTPUT 0 #define UAC_INPUT 1 #define UAC_EQUAL 2 @@ -346,18 +390,8 @@ static usb_callback_t umidi_bulk_read_callback; static usb_callback_t umidi_bulk_write_callback; -static void uaudio_chan_fill_info_sub(struct uaudio_softc *, - struct usb_device *, uint32_t, uint8_t, uint8_t); -static void uaudio_chan_fill_info(struct uaudio_softc *, - struct usb_device *); -static void uaudio_mixer_add_ctl_sub(struct uaudio_softc *, - struct uaudio_mixer_node *); -static void uaudio_mixer_add_ctl(struct uaudio_softc *, - struct uaudio_mixer_node *); -static void uaudio_mixer_add_input(struct uaudio_softc *, - const struct uaudio_terminal_node *, int); -static void uaudio_mixer_add_output(struct uaudio_softc *, - const struct uaudio_terminal_node *, int); +/* USB audio v1.0 */ + static void uaudio_mixer_add_mixer(struct uaudio_softc *, const struct uaudio_terminal_node *, int); static void uaudio_mixer_add_selector(struct uaudio_softc *, @@ -386,6 +420,42 @@ const uint8_t *, uint8_t, struct uaudio_search_result *); static void uaudio_mixer_find_outputs_sub(struct uaudio_terminal_node *, uint8_t, uint8_t, struct uaudio_search_result *); +static const void *uaudio_mixer_verify_desc(const void *, uint32_t); + +/* USB audio v2.0 */ + +static void uaudio20_mixer_add_mixer(struct uaudio_softc *, + const struct uaudio20_terminal_node *, int); +static void uaudio20_mixer_add_selector(struct uaudio_softc *, + const struct uaudio20_terminal_node *, int); +static void uaudio20_mixer_add_feature(struct uaudio_softc *, + const struct uaudio20_terminal_node *, int); +static struct usb_audio20_cluster uaudio20_mixer_get_cluster(uint8_t, + const struct uaudio20_terminal_node *); +static uint16_t uaudio20_mixer_determine_class(const struct uaudio20_terminal_node *, + struct uaudio_mixer_node *); +static uint16_t uaudio20_mixer_feature_name(const struct uaudio20_terminal_node *, + struct uaudio_mixer_node *); +static const struct uaudio20_terminal_node *uaudi
Re: USB 3.0 Issues
On Sunday, September 02, 2012 03:17:04 PM Hans Petter Selasky wrote: > On Sunday 02 September 2012 18:48:16 Derrick Edwards wrote: > > When I disable USB 3.0 support in the BIOS, USB functions properly. Any > > ideas on what could be causing this? Please let me know what additional > > information you need. > > Hi, > > I'm afraid I need my hand on your device to figure this out. > > When the device init fails, it means that SET-ADDRESS fails, and without > that we are lost. > > You could try setting this variable in /boot/loader.conf > > hw.usb.xhci.xhci_port_route="0x" > hw.usb.xhci.xhci_port_route="0x0" > hw.usb.xhci.xhci_port_route="0x1" > hw.usb.xhci.xhci_port_route="0x2" > hw.usb.xhci.xhci_port_route="0x4" > hw.usb.xhci.xhci_port_route="0x8" > > And so on. > > --HPS Hans, Thanks for the reply. I added your suggestions to /boot/loader.conf and now the enabled USB 3.0 system works 90 percent of the time so far. For example in the below example the USB stick was recongized, then not, the recongized again after multiple inserts and detachs. Sep 3 08:05:45 joker kernel: ugen2.3: at usbus2 (disconnected) Sep 3 08:05:45 joker kernel: umass0: at uhub3, port 4, addr 3 (disconnected) Sep 3 08:05:45 joker kernel: (da0:umass-sim0:0:0:0): lost device - 0 outstanding, 1 refs Sep 3 08:05:45 joker kernel: (da0:umass-sim0:0:(pass3:0:umass-sim0:0:0): removing device entry Sep 3 08:05:45 joker kernel: 0:0): passdevgonecb: devfs entry is gone Sep 3 08:06:12 joker kernel: xhci_do_command: Command timeout! Sep 3 08:06:12 joker kernel: usb_alloc_device: device init 2 failed (USB_ERR_TIMEOUT, ignored) Sep 3 08:06:12 joker kernel: ugen0.2: at usbus0 (disconnected) Sep 3 08:06:12 joker kernel: uhub_reattach_port: could not allocate new device Sep 3 08:06:36 joker kernel: ugen2.3: at usbus2 Sep 3 08:06:36 joker kernel: umass0: on usbus2 Sep 3 08:06:36 joker kernel: umass0: SCSI over Bulk-Only; quirks = 0x0100 Sep 3 08:06:36 joker kernel: umass0:6:0:-1: Attached to scbus6 Sep 3 08:06:36 joker kernel: da0 at umass-sim0 bus 0 scbus6 target 0 lun 0 Sep 3 08:06:36 joker kernel: da0: Removable Direct Access SCSI-4 device Sep 3 08:06:36 joker kernel: da0: 40.000MB/s transfers Sep 3 08:06:36 joker kernel: da0: 3864MB (7913472 512 byte sectors: 255H 63S/T 492C) ___ freebsd-usb@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-usb To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"
Re: usb/171262: plug in sdhc via usb reader reboots machine
The following reply was made to PR usb/171262; it has been noted by GNATS. From: Hans Petter Selasky To: freebsd-usb@freebsd.org Cc: Waitman Gobble , freebsd-gnats-sub...@freebsd.org Subject: Re: usb/171262: plug in sdhc via usb reader reboots machine Date: Mon, 3 Sep 2012 17:27:59 +0200 On Sunday 02 September 2012 23:03:52 Waitman Gobble wrote: > >Number: 171262 > >Category: usb > >Synopsis: plug in sdhc via usb reader reboots machine > >Confidential: no > >Severity: non-critical > >Priority: low > >Responsible:freebsd-usb > >State: open > >Quarter: > >Keywords: > >Date-Required: > >Class: sw-bug > >Submitter-Id: current-users > >Arrival-Date: Sun Sep 02 21:10:11 UTC 2012 > >Closed-Date: > >Last-Modified: > >Originator: Waitman Gobble > >Release:FreeBSD 9.1-RC1 > > >Organization: > Waitman Gobble > > >Environment: > FreeBSD kamira.waitman.net 9.1-RC1 FreeBSD 9.1-RC1 #0: Tue Aug 14 04:25:06 > UTC 2012 r...@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC > amd64 > > >Description: > was dumping sdhc cards to ntfs-3g mounted usb drive (8 cards successfully, > then inserting 9th card rebooted machine) > > this in logs 45 times: > > Sep 3 04:36:59 kamira kernel: (da1:umass-sim1:1:0:0): SCSI sense: HARDWARE > FAILURE asc:4b,0 (Data phase error) > > (then machine reboot.) > > full log starting from insert: > > > >How-To-Repeat: > reader in usb port with sdhc card seems to work 'most of the time' but for > some reason caused machine reboot in one instance. thank you. > Hi, If you add the kernel debugging options to your GENERIC file, then you will get a backtrace next time it crashes. There is also a script under: /usr/src/tools/regression/usb/ Which you can use to forcedly re-enumerate your USB card-reader. Try that when a card is inserted with NTFS and see what happens. --HPS ___ freebsd-usb@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-usb To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"
Re: usb/171262: plug in sdhc via usb reader reboots machine
On Sunday 02 September 2012 23:03:52 Waitman Gobble wrote: > >Number: 171262 > >Category: usb > >Synopsis: plug in sdhc via usb reader reboots machine > >Confidential: no > >Severity: non-critical > >Priority: low > >Responsible:freebsd-usb > >State: open > >Quarter: > >Keywords: > >Date-Required: > >Class: sw-bug > >Submitter-Id: current-users > >Arrival-Date: Sun Sep 02 21:10:11 UTC 2012 > >Closed-Date: > >Last-Modified: > >Originator: Waitman Gobble > >Release:FreeBSD 9.1-RC1 > > >Organization: > Waitman Gobble > > >Environment: > FreeBSD kamira.waitman.net 9.1-RC1 FreeBSD 9.1-RC1 #0: Tue Aug 14 04:25:06 > UTC 2012 r...@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC > amd64 > > >Description: > was dumping sdhc cards to ntfs-3g mounted usb drive (8 cards successfully, > then inserting 9th card rebooted machine) > > this in logs 45 times: > > Sep 3 04:36:59 kamira kernel: (da1:umass-sim1:1:0:0): SCSI sense: HARDWARE > FAILURE asc:4b,0 (Data phase error) > > (then machine reboot.) > > full log starting from insert: > > > >How-To-Repeat: > reader in usb port with sdhc card seems to work 'most of the time' but for > some reason caused machine reboot in one instance. thank you. > Hi, If you add the kernel debugging options to your GENERIC file, then you will get a backtrace next time it crashes. There is also a script under: /usr/src/tools/regression/usb/ Which you can use to forcedly re-enumerate your USB card-reader. Try that when a card is inserted with NTFS and see what happens. --HPS ___ freebsd-usb@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-usb To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"
Re: usb/171262: plug in sdhc via usb reader reboots machine
The following reply was made to PR usb/171262; it has been noted by GNATS. From: Hans Petter Selasky To: freebsd-usb@freebsd.org Cc: Waitman Gobble , freebsd-gnats-sub...@freebsd.org Subject: Re: usb/171262: plug in sdhc via usb reader reboots machine Date: Mon, 3 Sep 2012 17:17:12 +0200 On Sunday 02 September 2012 23:03:52 Waitman Gobble wrote: > >Number: 171262 > >Category: usb > >Synopsis: plug in sdhc via usb reader reboots machine > >Confidential: no > >Severity: non-critical > >Priority: low > >Responsible:freebsd-usb > >State: open > >Quarter: > >Keywords: > >Date-Required: > >Class: sw-bug > >Submitter-Id: current-users > >Arrival-Date: Sun Sep 02 21:10:11 UTC 2012 > >Closed-Date: > >Last-Modified: > >Originator: Waitman Gobble > >Release:FreeBSD 9.1-RC1 > > >Organization: > Waitman Gobble > > >Environment: > FreeBSD kamira.waitman.net 9.1-RC1 FreeBSD 9.1-RC1 #0: Tue Aug 14 04:25:06 > UTC 2012 r...@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC > amd64 > > >Description: > was dumping sdhc cards to ntfs-3g mounted usb drive (8 cards successfully, > then inserting 9th card rebooted machine) > > this in logs 45 times: > > Sep 3 04:36:59 kamira kernel: (da1:umass-sim1:1:0:0): SCSI sense: HARDWARE > FAILURE asc:4b,0 (Data phase error) > > (then machine reboot.) > > full log starting from insert: > > > >How-To-Repeat: > reader in usb port with sdhc card seems to work 'most of the time' but for > some reason caused machine reboot in one instance. thank you. > Hi, I think this is not caused by USB. Probably a CAM or filesystem issue. --HPS ___ freebsd-usb@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-usb To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"
Re: usb/171262: plug in sdhc via usb reader reboots machine
On Sunday 02 September 2012 23:03:52 Waitman Gobble wrote: > >Number: 171262 > >Category: usb > >Synopsis: plug in sdhc via usb reader reboots machine > >Confidential: no > >Severity: non-critical > >Priority: low > >Responsible:freebsd-usb > >State: open > >Quarter: > >Keywords: > >Date-Required: > >Class: sw-bug > >Submitter-Id: current-users > >Arrival-Date: Sun Sep 02 21:10:11 UTC 2012 > >Closed-Date: > >Last-Modified: > >Originator: Waitman Gobble > >Release:FreeBSD 9.1-RC1 > > >Organization: > Waitman Gobble > > >Environment: > FreeBSD kamira.waitman.net 9.1-RC1 FreeBSD 9.1-RC1 #0: Tue Aug 14 04:25:06 > UTC 2012 r...@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC > amd64 > > >Description: > was dumping sdhc cards to ntfs-3g mounted usb drive (8 cards successfully, > then inserting 9th card rebooted machine) > > this in logs 45 times: > > Sep 3 04:36:59 kamira kernel: (da1:umass-sim1:1:0:0): SCSI sense: HARDWARE > FAILURE asc:4b,0 (Data phase error) > > (then machine reboot.) > > full log starting from insert: > > > >How-To-Repeat: > reader in usb port with sdhc card seems to work 'most of the time' but for > some reason caused machine reboot in one instance. thank you. > Hi, I think this is not caused by USB. Probably a CAM or filesystem issue. --HPS ___ freebsd-usb@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-usb To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"
Current problem reports assigned to freebsd-usb@FreeBSD.org
Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description o usb/171262 usbplug in sdhc via usb reader reboots machine o usb/171197 usbADATA Classic CH11 USB HDD doesn't work in FreeBSD 9.1 o usb/170699 usbFreeBSD 9.0 Doesn't list HDD or its partitions in part o usb/170688 usbpatch][usbdevs][wlan] Patch for ASUS Black Diamond USB o usb/170606 usbr239222 kernel panic at boot - usb locking issue o usb/170358 usb[ums] Wrong (duplicate) button numbers o usb/170123 usb[umass] HP v210w USB stick not supported o usb/169935 usb[keyboard] Unable use USB keyboard while panic o usb/169789 usb[u3g] [patch] add support for huawei e3131 o usb/169461 usb[ugen] USB2 high-speed device detected as full speed o usb/169428 usb[ugen] ugen not detecting all endpoints on device [reg o usb/168551 usb[umass] Issues with embedded card reader (Laptop ASUS o usb/168132 usb[umass] MATSHITA memory card size reported wrong, moun o usb/167847 usb[ural] dlink dwl-122g e crashes(?) when trying wap2 cr o usb/167001 usb[USB] [PATCH] add support for Smart G2 64MB memory key o usb/166848 usb[umass] [patch] Buffalo RUF2 requires quirk o usb/165815 usb[usbdevs] [patch] add k3772z 3g modem support o usb/165163 usb[keyboard] The USB RF keyboard and mouse become non-re o usb/164058 usb[umass] Lexar 8GB USB flash drive doesn't work by defa f usb/163328 usb[usb] Support for Atheros USB abgn devices o kern/163091 usb[panic] Fatal trap 12: page fault while in kernel mode f usb/162306 usbusb devices cant get address asignation, no memories, o usb/162054 usbusbdump just hangs on 9.0-RC1 f usb/161793 usbpoor EHCI usb2 i/o performance o usb/160436 usbucom wedges machine on parity error ? o usb/160299 usbMicroSDHC-to-USB adapters do not work in FreeBSD 8.x o usb/160192 usb[install] Installation from USB-Stick doesn't find the o usb/159611 usb[PATCH] USB stick extrememory Snippy needs quirks o usb/159274 usbUSB 3.0 Etron EJ168A does not work. f usb/159191 usb[fusefs-ntfs] write on fusefs-ntfs mounted partition r o usb/157376 usbLaCie USB disk not recognized o usb/157074 usb[boot] [usb8] vfs_mountroot_ask is called when no usb o usb/156898 usb[keyboard] usb keyboard does not work while boot (ps2 f usb/156735 usbNeed Quirk for Goflex USB Disk Drives o usb/156726 usb[snd_uaudio]: snd_uaudio(4) fails to detach when mixer o usb/156725 usbUSB stack stall cause complete system input loss o usb/156596 usb[ehci] Extremely high interrupt rate on ehci/uhci IRQ1 o usb/156000 usbrum(4) Fatal trap 18: integer divide fault while in ke f usb/155996 usbNanoBSD not booted as Disk o usb/155784 usbProblem with Transcend StoreJet 25M3 (2AJ1) on Asus M2 o usb/155663 usb[usbdevs] [patch] Add support for Supertop Nano 1GB US o usb/154753 usb[usbdevs] [patch] Support for Qualcomm USB modem/stora o usb/154506 usb[umass] Copying dir with large files makes FreeBSD loa o usb/154192 usb[umass] In Garmin Oregon GPS, only the first umass dev o i386/153851 usb[keyboard] keyboard issues on new Intel Mother boards. o usb/153703 usb[keyboard] My USB keyboard can not be used in 8-STABLE o usb/153609 usb[zyd] [panic] kernel: Fatal trap 12: page fault while o usb/153599 usb[usbdevs] [patch] Feiya Elango USB MicroSD reader sync o usb/153149 usb[umass] USB stick quirk regression [regression] o usb/152075 usb[usb8] [ehci] [request] Add quirk for CS5536 USB o usb/150892 usb[zyd] Whenever network contacted in any shape, way or o usb/150189 usb[run] [usb8] [patch] if_run appears to corrupt IP traf p usb/149764 usb[u3g] [patch] usbdevs update: Huawei K3765 3G modem o usb/149283 usb[uftdi] avrdude unable to talk to Arduino board (via u o usb/149162 usb[ural] ASUS WL-167g doesn't work in 8.1 (continue of 1 s usb/148702 usb[usb8] [request] IO DATA USB-RSAQ5 support on FreeBSD- o usb/148080 usbusbconfig(8) sometimes does not turn off the device o usb/147516 usb[umass] [usb67] kernel unable to deal with Olympus USB o i386/147475 usb[install] FreeBSD 8.x does not install on ASUS K8N4-E o usb/146840 usb[hang] FreeBSD 7.2 / 7.3 / 8.0 hang at startup after e o usb/146153 usb