From owner-freebsd-arm@freebsd.org Sun Nov 25 02:31:11 2018 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09D6811434AB for ; Sun, 25 Nov 2018 02:31:11 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9CFC6716C5 for ; Sun, 25 Nov 2018 02:31:10 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id CF7A2AE40 for ; Sun, 25 Nov 2018 02:31:09 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id wAP2V9aF064475 for ; Sun, 25 Nov 2018 02:31:09 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id wAP2V9UR064469 for freebsd-arm@FreeBSD.org; Sun, 25 Nov 2018 02:31:09 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: freebsd-arm@FreeBSD.org Subject: [Bug 233489] SPI on the Raspberry Pi 3 is not working Date: Sun, 25 Nov 2018 02:31:09 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: arm X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: vince.bsd@hightek.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-arm@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-Rspamd-Queue-Id: 9CFC6716C5 X-Spamd-Result: default: False [2.15 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_SPAM_LONG(0.83)[0.828,0]; NEURAL_SPAM_MEDIUM(0.74)[0.743,0]; ASN(0.00)[asn:10310, ipnet:2001:1900:2254::/48, country:US]; NEURAL_SPAM_SHORT(0.57)[0.575,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Nov 2018 02:31:11 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D233489 Bug ID: 233489 Summary: SPI on the Raspberry Pi 3 is not working Product: Base System Version: CURRENT Hardware: arm64 OS: Any Status: New Severity: Affects Many People Priority: --- Component: arm Assignee: freebsd-arm@FreeBSD.org Reporter: vince.bsd@hightek.org Created attachment 199531 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D199531&action= =3Dedit device tree Hi. We are trying to gain userland access to SPI on the raspberry PI 3 on FreeB= SD 12 and FreeBSD 13.0-CURRENT. When we load the spigen.ko kernel module, it successfully loads but no spig= en devices appear in /dev. There is a dtb file in the rpi boot partition, bcm2710-rpi-3-b.dtb, and we confirmed it is being loaded. SPI is enabled in config.txt with the line, "dtparam=3Daudio=3Don,i2c_arm=3Don,spi=3Don". sysctl output shows=20 dev.gpio.0.pin.11.function: alt0 dev.gpio.0.pin.10.function: alt0 dev.gpio.0.pin.9.function: alt0 alt0 is correct for SPI according to the Broadcom manual. Yet no /dev/spigen0.n appear with the spigen.ko module loaded. To confirm, we set spi=3Doff in config.txt, for testing, and rebooted and t= hose three pins changed to dev.gpio.0.pin.11.function: input dev.gpio.0.pin.10.function: input dev.gpio.0.pin.9.function: input I have attached the device tree with SPI enabled as output by "ofwdump -a". We also tested with the latest snapshot for FreeBSD 13 as of 11/20/2018. BTW, i2c seems to work fine except that setting the speed via sysctl does n= ot work. --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-arm@freebsd.org Sun Nov 25 03:35:48 2018 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 655E31144F24 for ; Sun, 25 Nov 2018 03:35:48 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io1-f47.google.com (mail-io1-f47.google.com [209.85.166.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B05D97344B for ; Sun, 25 Nov 2018 03:35:47 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io1-f47.google.com with SMTP id a3so11374283ioc.4 for ; Sat, 24 Nov 2018 19:35:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/uKyJFTGnIvL1MwOVj/n8lvSCn00PVyZ5gcnttGA6NE=; b=W/+o0rA3ksgcGM5rE3ixoXjmCTha9/f0lrnXUstWI6aOuHpIw6w6gjeEcfgKHvIlRe cQ4rXb5DAiI4bZOFbud/kWfCGLob6nc5jIU8pMp9H4QDgQMMnusMRWCX4746XcDFoB2A cbRJkiYZ1b+OrtoU/ntP2AMGfc6asMyw04Y10Q0gdsTMnEfQtIvIBJBW27C55rDpC+iW WNiT3uMcXjroBhUn19+139AbEuiVUqOoeoSQdLGcShDPwDkakBIG1tmdm//WN1JD1RZi 0aQTcNYc8IiU8BADtImD15K1joxisI6thgdVZgRapM8EXsy7WPMZME2xg1CHbeMemUjY IbOg== X-Gm-Message-State: AA+aEWZCGg9tpE9qoGeuhOqbDzC1SR+nbr6yzcVjWFQxHLSxBRcc03Cp UDOZEgW8nUh/Q7yqTGN86FTED6fT81pmgU8LEh5KJ04J X-Google-Smtp-Source: AFSGD/WtSA8sgWskuznsvyNbGbWi+tFwRnNOwjZ3HF5CICP6NQLf++ZYjGk1lzM33TSGlxUGbc5rgXoNFWil1OM9EVY= X-Received: by 2002:a6b:fe13:: with SMTP id x19mr15821368ioh.294.1543116946926; Sat, 24 Nov 2018 19:35:46 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Ed Maste Date: Sat, 24 Nov 2018 22:35:34 -0500 Message-ID: Subject: Re: ld.lld goes out of memory To: Ronald Klop Cc: "freebsd-arm@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: B05D97344B X-Spamd-Result: default: False [-3.96 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[47.166.85.209.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_SHORT(-0.93)[-0.931,0]; RCVD_TLS_LAST(0.00)[]; FORGED_SENDER(0.30)[emaste@freebsd.org,carpeddiem@gmail.com]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[emaste@freebsd.org,carpeddiem@gmail.com]; IP_SCORE(-1.02)[ipnet: 209.85.128.0/17(-3.57), asn: 15169(-1.44), country: US(-0.09)]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Nov 2018 03:35:48 -0000 On Sat, 24 Nov 2018 at 14:49, Ronald Klop wrote: > > Hello, > > While compiling databases/mongodb34 on my RPI3B+ 12.0-RC1/arm64 ld.lld > fails often because of 'out of swap' or other issues about memory > shortage. Is this something others experience on "low memory" machines? > ... > -bool lld::ThreadsEnabled = true; > +bool lld::ThreadsEnabled = false; Note that lld has a --no-threads flag that should achieve the same thing without a compile-time change. From owner-freebsd-arm@freebsd.org Sun Nov 25 05:45:34 2018 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B2DA1147DD5 for ; Sun, 25 Nov 2018 05:45:34 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic305-20.consmr.mail.ne1.yahoo.com (sonic305-20.consmr.mail.ne1.yahoo.com [66.163.185.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5EDD47654B for ; Sun, 25 Nov 2018 05:45:33 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: mcURkd4VM1lAef5kyovQc5tNiOcMgQ9nCNL4lZ8oSk0tCutbcXsVQVbZHbPhcct yHzBWWN6kR1pKQ1hRpa_FuFn_1Mn2fn.reFH294fKy3fpY0.jeEZCI13XyPRW09_g8wa.PxzYw4M EO_S0MuVPDJOHsTlqCGmqxZVlRvV5GQqjdoMrjJd2U.0fwCIyGfj2nCAR6lme2wSdONZSbz.8JKp b8ba.8ELI4WxMVDYzt5tnD1lDHqblwOq0lp7hf7.hWSXTIxH..xfdo1695np1EIL0OHPstdJisDC WGUwK.bnIxPdmYfaHlXnVHCcel5Ae3997HmILGjxpq07TEWCg1OemSnthx0y.QF4zr8nMyjZ_Rt. 75B3l5cGJyadcm_4R2rJDVVmMoZVE49zKWGJGb7nMS9_AONJvtrBiBL6EfCmgWLCyUzWv9kLiNSJ uC0KbZjV2aX7xVDSYD3kdYlR8Egpz3ZgkgQISzKyw9CcljPe9Gg_nKOc9JHtKloFs2qQHJ88SbGv YJ8pVphwH7Zqrh6KxfOfIY5eKRDOj_0s7EebME7BO_rqwu_9.NjZ3v9tO5_JA8Sc6CFKTp9fvR1a NXuGErBj4l7Y1pDHBicgkbAJa6.dy26Gs4778AsWT.wr7.3KNi_ajS_C2.hqx_5sq87s1J75O5Am QumnuyvCsprqOOpPoMfYYDDL4SNYLWUA3Wlyj11cs6cuNZLRHTnaRncKcBkls9AQz16SPEzgf54t 2ucQ7cyIgmIiSHYwKnGedbqPRmtQLY8nL2ewJ8nWYLc._Y650NNmQKFN0fWrB2ao9rQnuenbPx_i QIjUQ7q43WQwbrvHk0_zC_mF3rGWp8HVv.ssH_a0LV8C.S8bgxoW.CVoCvlQtf.zLFJubdkOq0Qz uOq42tHYAzFo.8PrX6vc842_P2pfx_S0hGvDAK3Arwqltk9MoE3cYNXD3GmolMVxCUzJlW_ajA6f WW2IkOqnM8ZNv4MLPCUXYNdRvbhXnc6aroOx5epZjShNq1NKlez6xt40fbSTXidO2f._TgVr3fyi hQcjjl.V.35CtB6KszKYIkPO4jh2ZyOajV9MhQwqlDEuU8zLc43aNKq_mzQg- Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.ne1.yahoo.com with HTTP; Sun, 25 Nov 2018 05:45:31 +0000 Received: from c-76-115-7-162.hsd1.or.comcast.net (EHLO [192.168.1.25]) ([76.115.7.162]) by smtp402.mail.ne1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 1ac7e938853eae8035e5d2d89bcc7597; Sun, 25 Nov 2018 05:45:27 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.1 \(3445.101.1\)) Subject: Re: ld.lld goes out of memory From: Mark Millard In-Reply-To: Date: Sat, 24 Nov 2018 21:45:26 -0800 Cc: Ronald Klop , "freebsd-arm@freebsd.org" Content-Transfer-Encoding: 7bit Message-Id: <6EB261C2-7B9F-43CD-95A0-1B6D82E70868@yahoo.com> References: To: Ed Maste X-Mailer: Apple Mail (2.3445.101.1) X-Rspamd-Queue-Id: 5EDD47654B X-Spamd-Result: default: False [3.02 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MV_CASE(0.50)[]; FREEMAIL_FROM(0.00)[yahoo.com]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[yahoo.com:+]; MX_GOOD(-0.01)[cached: mta6.am0.yahoodns.net]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; FROM_EQ_ENVFROM(0.00)[]; IP_SCORE(1.12)[ip: (2.80), ipnet: 66.163.184.0/21(1.60), asn: 36646(1.28), country: US(-0.09)]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36646, ipnet:66.163.184.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.com]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_SPAM_SHORT(0.98)[0.980,0]; MIME_GOOD(-0.10)[text/plain]; NEURAL_SPAM_MEDIUM(0.65)[0.654,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.78)[0.781,0]; RCVD_IN_DNSWL_NONE(0.00)[146.185.163.66.list.dnswl.org : 127.0.5.0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Nov 2018 05:45:34 -0000 On 2018-Nov-24, at 19:35, Ed Maste wrote: > On Sat, 24 Nov 2018 at 14:49, Ronald Klop wrote: >> >> Hello, >> >> While compiling databases/mongodb34 on my RPI3B+ 12.0-RC1/arm64 ld.lld >> fails often because of 'out of swap' or other issues about memory >> shortage. Is this something others experience on "low memory" machines? >> ... >> -bool lld::ThreadsEnabled = true; >> +bool lld::ThreadsEnabled = false; > > Note that lld has a --no-threads flag that should achieve the same > thing without a compile-time change. When I looked into it earlier I did not find a ports equivalent of the buildworld buildkernel global control via, say, LDFLAGS.lld+=-Wl,--no-threads The binutils linkers will not tolerate the option. So it ends up being a port-by-port adjustment as far as I could tell. It need not be just low memory machines: for N cpus, in FreeBSD terms, lld with threads enabled adds N+1 threads (not counting main's thread: N+2 total). If several lld's run at once it can get to be a lot of threads at once in a poudriere run. I've observed this fanout on a 32-hardware thread context, so 34 threads for one lld, counting the main thread. And at times I've had several compiler toolchains building at once with multiple lld's running at once. (But I did happen to have sufficient RAM for what happened.) === Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-freebsd-arm@freebsd.org Sun Nov 25 10:16:38 2018 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8AD20114E82C; Sun, 25 Nov 2018 10:16:38 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D6A1C7D885; Sun, 25 Nov 2018 10:16:37 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id wAPAGQdq059731 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 25 Nov 2018 12:16:29 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua wAPAGQdq059731 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id wAPAGQQK059730; Sun, 25 Nov 2018 12:16:26 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 25 Nov 2018 12:16:26 +0200 From: Konstantin Belousov To: current@FreeBSD.org, freebsd-arm@FreeBSD.org Subject: Re: maxswzone NOT used correctly and defaults incorrect? Message-ID: <20181125101626.GX2378@kib.kiev.ua> References: <20181124090429.GI10067@funkthat.com> <20181124104032.GV2378@kib.kiev.ua> <20181124200934.GJ10067@funkthat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181124200934.GJ10067@funkthat.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tom.home X-Rspamd-Queue-Id: D6A1C7D885 X-Spamd-Result: default: False [-4.06 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; HAS_XAW(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[3]; SUBJECT_ENDS_QUESTION(1.00)[]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-0.98)[-0.976,0]; IP_SCORE(-2.07)[ip: (-2.35), ipnet: 2001:470::/32(-4.46), asn: 6939(-3.45), country: US(-0.09)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; RCVD_TLS_LAST(0.00)[]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Nov 2018 10:16:38 -0000 On Sat, Nov 24, 2018 at 12:09:34PM -0800, John-Mark Gurney wrote: > Konstantin Belousov wrote this message on Sat, Nov 24, 2018 at 12:40 +0200: > > On Sat, Nov 24, 2018 at 01:04:29AM -0800, John-Mark Gurney wrote: > > > I have an BeagleBoard Black. I'm running a recent snapshot: > > > FreeBSD generic 13.0-CURRENT FreeBSD 13.0-CURRENT r340239 GENERIC arm > > > > > > aka: > > > FreeBSD-13.0-CURRENT-arm-armv7-BEAGLEBONE-20181107-r340239.img.xz > > > > > > It has 512MB of memory on board. I created a 4GB swap file. According > > > to loader(8), this should be the default capable: > > > in bytes of KVA space. If no value is provided, the system > > > allocates enough memory to handle an amount of swap that > > > corresponds to eight times the amount of physical memory > > > present in the system. > > > > > > avail memory = 505909248 (482 MB) > > > > > > but I get this: > > > warning: total configured swap (1048576 pages) exceeds maximum recommended amount (248160 pages). > > > warning: increase kern.maxswzone or reduce amount of swap. > > > > > > So, this appears that it's only 2x amount of memory, NOT 8x like the > > > documentation says. > > > > > > When running make in sbin/ggate/ggated, make consumes a large amount > > > of memory. Before the OOM killer just kicked in, top showed: > > > Mem: 224M Active, 4096 Inact, 141M Laundry, 121M Wired, 57M Buf, 2688K Free > > > Swap: 1939M Total, 249M Used, 1689M Free, 12% Inuse, 1196K Out > > > > > > PID UID THR PRI NICE SIZE RES STATE TIME WCPU COMMAND > > > 1029 1001 1 44 0 594M 3848K RUN 2:03 38.12% make > > > > > > swapinfo -k showed: > > > /dev/md99 4194304 254392 3939912 6% > > > > > > sysctl: > > > vm.swzone: 4466880 > > > vm.swap_maxpages: 496320 > > > kern.maxswzone: 0 > > > > > > dmesg when OOM strikes: > > > swap blk zone exhausted, increase kern.maxswzone > > > pid 1029 (make), uid 1001, was killed: out of swap space > > > pid 984 (bash), uid 1001, was killed: out of swap space > > > pid 956 (bash), uid 1001, was killed: out of swap space > > > pid 952 (sshd), uid 0, was killed: out of swap space > > > pid 1043 (bash), uid 1001, was killed: out of swap space > > > pid 626 (dhclient), uid 65, was killed: out of swap space > > > pid 955 (sshd), uid 1001, was killed: out of swap space > > > pid 1025 (bash), uid 1001, was killed: out of swap space > > > swblk zone ok > > > lock order reversal: > > > 1st 0xd374d028 filedesc structure (filedesc structure) @ /usr/src/sys/kern/sys_generic.c:1451 > > > 2nd 0xd41a5bc4 devfs (devfs) @ /usr/src/sys/kern/vfs_vnops.c:1513 > > > stack backtrace: > > > swap blk zone exhausted, increase kern.maxswzone > > > pid 981 (tmux), uid 1001, was killed: out of swap space > > > pid 983 (tmux), uid 1001, was killed: out of swap space > > > pid 1031 (bash), uid 1001, was killed: out of swap space > > > pid 580 (dhclient), uid 0, was killed: out of swap space > > > swblk zone ok > > > swap blk zone exhausted, increase kern.maxswzone > > > pid 577 (dhclient), uid 0, was killed: out of swap space > > > pid 627 (devd), uid 0, was killed: out of swap space > > > swblk zone ok > > > swap blk zone exhausted, increase kern.maxswzone > > > pid 942 (getty), uid 0, was killed: out of swap space > > > swblk zone ok > > > swap blk zone exhausted, increase kern.maxswzone > > > pid 1205 (init), uid 0, was killed: out of swap space > > > swblk zone ok > > > swap blk zone exhausted, increase kern.maxswzone > > > pid 1206 (init), uid 0, was killed: out of swap space > > > swblk zone ok > > > swap blk zone exhausted, increase kern.maxswzone > > > swblk zone ok > > > swap blk zone exhausted, increase kern.maxswzone > > > swblk zone ok > > > > > > So, as you can see, despite having plenty of swap, and swap usage being > > > well below any of the maximums, the OOM killer kicked in, and killed off > > > a bunch of processes. > > OOM is guided by the pagedaemon progress, not by the swap amount left. > > If the system cannot meet the pagedaemon targetp by doing > > $(sysctl vm.pageout_oom_seq) back-to-back page daemon passes, > > it declares OOM condition. E.g. if you have very active process which > > keeps a lot of active memory by referencing the pages, and simultenously > > a slow or stuck swap device, then you get into this state. > > > > Just by looking at the top stats, you have a single page in the inactive > > queue, which means that pagedaemon desperately frees clean pages and > > moves dirty pages into the laundry. Also, you have relatively large > > laundry queue, which supports the theory about slow swap. > > Yes, swap is "slow" by modern standards, but not really that slow... I'm > swapping out at over 10MB/sec... For such a system, this is quite > fast... > > Though maybe I wasn't explicit, it's very clear that I'm running out > of the swap blk zone, per the very first message, and the vmstat -z > stats below (and the resulting failures): > swap blk zone exhausted > > > You may try to increase vm.pageout_oom_seq to move OOM trigger furhter > > after the system is overloaded with swapping. > > > > > > > > It also looks like the algorithm for calculating kern.maxswzone is not > > > correct. > > > > > > I just tried to run the system w/: > > > kern.maxswzone: 21474836 > > > > > > and it again died w/ plenty of swap free: > > > /dev/md99 4194304 238148 3956156 6% > > > > > > This time I had vmstat -z | grep sw running, and saw: > > > swpctrie: 48, 62084, 145, 270, 203, 0, 0 > > > swblk: 72, 62040, 56357, 18, 56587, 0, 0 > > > > > > after the system died, I logged back in as see: > > > swpctrie: 48, 62084, 28, 387, 240, 0, 0 > > > swblk: 72, 62040, 175, 61865, 62957, 16, 0 > > > > > > so, it clearly ran out of swblk space VERY early, when only consuming > > > around 232MB of swap... > > > > > > Hmm... it looks like swblk and swpctrie are not affected by the setting > > > of kern.maxswzone... I just set it to: > > > kern.maxswzone: 85899344 > > > > > > and the limits for the zones did not increase at ALL: > > > swpctrie: 48, 62084, 0, 0, 0, 0, 0 > > > swblk: 72, 62040, 0, 0, 0, 0, 0 > > The swap metadata zones must have all the KVA reserved in advance, > > because we cannot wait for AS or memory while we try to free some > > memory. At boot, the swap init code allocates KVA starting with the > > requested amount. If the allocation fails, it reduces the amount by > > 2/3 and retries, until the allocation succeeds. What you see in limits > > is the actual amount of KVA that your platform is able to provide for > > reserve, so increasing the maxswzone only results in more iterations to > > allocate. > > Except that I don't see the warning "Swap blk zone entries reduced > from" in the dmesg which I'd expect to see that code is triggered... > > I find it hard to believe that it can't allocate more than 5MB of KVA > at boot... per above, 72*62040 ~= 4.26MB... > > It does look like the calculation is correct for swblk assuming maxswzone > is not set (0), as: > vm.stats.vm.v_page_count: 124041 > > and: > n = vm_cnt.v_page_count / 2; > > I'll be adding a print for maxswzone to make sure it's getting set, > though it'll take me a while to get a kernel built... > > and kenv does show it set: > [freebsd@generic ~]$ sysctl kern.maxswzone > kern.maxswzone: 85899344 > [freebsd@generic ~]$ kenv | grep kern.maxswzone > kern.maxswzone="85899344" > > so how that code isn't being triggered is quite strange... Try this diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index 54370523086..b5e92bc97ee 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -547,12 +547,12 @@ swap_pager_swap_init(void) mtx_unlock(&pbuf_mtx); /* - * Initialize our zone, guessing on the number we need based - * on the number of pages in the system. + * Initialize our zone, taking the user sizing or guessing on + * the number we need based on the number of pages in the + * system. */ - n = vm_cnt.v_page_count / 2; - if (maxswzone && n > maxswzone / sizeof(struct swblk)) - n = maxswzone / sizeof(struct swblk); + n = maxswzone != 0 ? maxswzone / sizeof(struct swblk) : + vm_cnt.v_page_count / 2; swpctrie_zone = uma_zcreate("swpctrie", pctrie_node_size(), NULL, NULL, pctrie_zone_init, NULL, UMA_ALIGN_PTR, UMA_ZONE_VM); if (swpctrie_zone == NULL) @@ -580,7 +580,7 @@ swap_pager_swap_init(void) n = uma_zone_get_max(swblk_zone); if (n < n2) - printf("Swap blk zone entries reduced from %lu to %lu.\n", + printf("Swap blk zone entries changed from %lu to %lu.\n", n2, n); swap_maxpages = n * SWAP_META_PAGES; swzone = n * sizeof(struct swblk); From owner-freebsd-arm@freebsd.org Sun Nov 25 18:52:30 2018 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 51A93113DD67 for ; Sun, 25 Nov 2018 18:52:30 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smarthost1.greenhost.nl (smarthost1.greenhost.nl [195.190.28.89]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46133727E3; Sun, 25 Nov 2018 18:52:28 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smtp.greenhost.nl ([213.108.110.112]) by smarthost1.greenhost.nl with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1gQzW6-0004jo-SI; Sun, 25 Nov 2018 19:52:27 +0100 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: "Ed Maste" , "Mark Millard" Cc: "freebsd-arm@freebsd.org" Subject: Re: ld.lld goes out of memory References: <6EB261C2-7B9F-43CD-95A0-1B6D82E70868@yahoo.com> Date: Sun, 25 Nov 2018 19:52:26 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Ronald Klop" Message-ID: In-Reply-To: <6EB261C2-7B9F-43CD-95A0-1B6D82E70868@yahoo.com> User-Agent: Opera Mail/12.16 (FreeBSD) X-Authenticated-As-Hash: 398f5522cb258ce43cb679602f8cfe8b62a256d1 X-Virus-Scanned: by clamav at smarthost1.samage.net X-Spam-Level: + X-Spam-Score: 1.0 X-Spam-Status: No, score=1.0 required=5.0 tests=ALL_TRUSTED, BAYES_80 autolearn=disabled version=3.4.2 X-Scan-Signature: 0cb660a7d4ce909c6359c48b0bded22a X-Rspamd-Queue-Id: 46133727E3 X-Spamd-Result: default: False [-2.05 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; NEURAL_HAM_MEDIUM(-0.76)[-0.762,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip4:195.190.28.64/27]; NEURAL_HAM_LONG(-0.81)[-0.807,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[klop.ws]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: mx2.greenhost.nl]; NEURAL_HAM_SHORT(-0.67)[-0.669,0]; IP_SCORE(0.00)[country: NL(0.01)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MID_RHS_NOT_FQDN(0.50)[]; ASN(0.00)[asn:47172, ipnet:195.190.28.0/24, country:NL]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Nov 2018 18:52:30 -0000 On Sun, 25 Nov 2018 06:45:26 +0100, Mark Millard wrote: > On 2018-Nov-24, at 19:35, Ed Maste wrote: > >> On Sat, 24 Nov 2018 at 14:49, Ronald Klop wrote: >>> >>> Hello, >>> >>> While compiling databases/mongodb34 on my RPI3B+ 12.0-RC1/arm64 ld.lld >>> fails often because of 'out of swap' or other issues about memory >>> shortage. Is this something others experience on "low memory" machines? >>> ... >>> -bool lld::ThreadsEnabled = true; >>> +bool lld::ThreadsEnabled = false; >> >> Note that lld has a --no-threads flag that should achieve the same >> thing without a compile-time change. > > When I looked into it earlier I did not find a ports > equivalent of the buildworld buildkernel global > control via, say, > > LDFLAGS.lld+=-Wl,--no-threads That was kind of my problem. Setting LDFLAGS in the ports Makefile broke the building at configure step. It was easier to disable threads at compile time of lld than to dive into the ports Makefile/scons structure. Regards, Ronald. > The binutils linkers will not tolerate the option. So > it ends up being a port-by-port adjustment as far as > I could tell. > > It need not be just low memory machines: for N > cpus, in FreeBSD terms, lld with threads enabled > adds N+1 threads (not counting main's thread: N+2 > total). If several lld's run at once it can get to > be a lot of threads at once in a poudriere run. > I've observed this fanout on a 32-hardware thread > context, so 34 threads for one lld, counting the > main thread. And at times I've had several compiler > toolchains building at once with multiple lld's > running at once. (But I did happen to have > sufficient RAM for what happened.) > > > === > Mark Millard > marklmi at yahoo.com > ( dsl-only.net went > away in early 2018-Mar) From owner-freebsd-arm@freebsd.org Mon Nov 26 19:21:06 2018 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00F9D11419FC for ; Mon, 26 Nov 2018 19:21:06 +0000 (UTC) (envelope-from herbert@gojira.at) Received: from mail.bsd4all.net (mail.bsd4all.net [IPv6:2a01:4f8:191:217b::25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "mail.bsd4all.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 086EC84C52 for ; Mon, 26 Nov 2018 19:21:04 +0000 (UTC) (envelope-from herbert@gojira.at) Date: Mon, 26 Nov 2018 20:21:00 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=gojira.at; s=mail201809; t=1543260062; bh=vP0KMe0rcjcS0g++oEX1DW0nyBd9DpKRMniYlGcplSM=; h=Date:Message-ID:From:To:Subject:MIME-Version:Content-Type:from:to: subject:date:content-type:mime-version:message-id; b=TkxMBJSQcuwsmkM7goOoTT31/eGrSqtTDAOoosjS1EStyG1lMwJOBX++qc6lSMmzF evXRkLxRQ/uV2zO1bg5NwCA/unYLXPG9agmjDYviWQJfTlYsZ2yozYo2F6wmIboeBw DXDUZwHpZ+jCOaYgA74P+28m2Zrvkc+gk+zX3ICBr1cX1728Z0OupesThtQkYlIChI CsY9FxmVB5XTPydTFjOctzlYEOgp/8DQD6SteYep9MBlVVzV9CyNoQTwDcxN7cnRP5 WONuZ952KxQU3I6nDxDETrl257x+Pqje3NCz5thJtVa3fQRvqqiwMC+mq8EPGWIh63 OT1431gbQ+LWQ== Message-ID: <87lg5fhcgz.wl-herbert@gojira.at> From: "Herbert J. Skuhra" To: freebsd-arm@freebsd.org Subject: Re: Raspberry PI 2B/3 and USB audio In-Reply-To: <875zx2hyey.wl-herbert@gojira.at> References: <87ftw96uq0.wl-herbert@gojira.at> <6beca923-ba25-3814-6bb2-f4cc2d7360d3@selasky.org> <875zx2hyey.wl-herbert@gojira.at> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL/10.8 EasyPG/1.0.0 Emacs/27.0 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 086EC84C52 X-Spamd-Result: default: False [-3.77 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gojira.at]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a01:4f8:191:217b::25]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[gojira.at]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MX_GOOD(-0.01)[cached: mail.bsd4all.net]; DKIM_TRACE(0.00)[gojira.at:+]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_SHORT(-0.98)[-0.985,0]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; IP_SCORE(-1.27)[ipnet: 2a01:4f8::/29(-3.53), asn: 24940(-2.81), country: DE(-0.01)]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; RCVD_TLS_ALL(0.00)[] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2018 19:21:06 -0000 On Mon, 12 Nov 2018 20:46:13 +0100, "Herbert J. Skuhra" wrote: > > On Sun, 11 Nov 2018 13:52:14 +0100, Hans Petter Selasky wrote: > > > > On 11/10/18 12:24 PM, Herbert J. Skuhra wrote: > > > Hi, > > > > > > if you use an USB sound card on your Raspberry PI 2B/3, can you please > > > answer the following questions: > > > > > > - which USB sound card? > > > - do you have bad audio on current or stable/12 after r339388? > > > > > > My "Creative Technology Ltd Sound Blaster Play 2" device sounds very > > > bad. Meanwhile more changes were commited but they don't fix audio > > > completly. > > > > > > > Hi, > > > > Some background: > > > > The USB controller in Raspberry PI is running HIGH-speed USB. Many USB > > audio device are FULL-speed USB. In order for a FULL-speed USB device > > to work in a HIGH-speed USB environment all data transfers need to go > > through a so-called transaction translator. This transaction > > translator operate on chunks of data, 171 bytes maximum. That means if > > a USB audio stream generates 1000 packets per second, then suddenly a > > bunch of smaller packets will be needed. This puts some stress on the > > DWC OTG driver and there might be some room for improvement in this > > area too, but the basic sympthom is that the DWC OTG driver in FreeBSD > > is not always able to keep up with the timing required for these > > so-called split transactions. One idea is to move all DWC OTG IRQ > > handling away from CPU-0. I'm not sure if cpuset supports this yet on > > armv7 // arm64. Might have to be done in the driver. > > > > Further some audio device use non-adaptive clocks, which means the > > recording channel must be active along with the playback channel else > > jitter will occur. > > > > The recommendation for RPI is a HIGH-speed USB audio device (should be > > clearly marked in the specification). Using a HIGH-speed USB audio > > device will reduce the number of interrupts significantly. > > Well, the sound card worked perfectly fine so far... both on FreeBSD > and Arch Linux ARM... no luck with NetBSD. Never mind! I am obviously > the only user affected by this "fix" (r339388). Unfortunally I've purchased another full-speed usb audio device: uaudio0 on uhub1 uaudio0: on usbus0 uaudio0: Play: 96000 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer. uaudio0: Play: 88200 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer. uaudio0: Play: 48000 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer. uaudio0: Play: 44100 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer. uaudio0: Record: 48000 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer. uaudio0: Record: 44100 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer. uaudio0: No MIDI sequencer. pcm0: on uaudio0 uaudio0: HID volume keys found. While it works fine under Linux (pulse), MacOS and Windows, it produces only bad noise under FreeBSD (Raspberry PI3B)! :-( How can I get it working? Can anyone recommend an USB audio device for FreeBSD? Should DACs from Pro-Ject work? Thanks. -- Herbert From owner-freebsd-arm@freebsd.org Mon Nov 26 19:43:38 2018 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B8A6A11427C8 for ; Mon, 26 Nov 2018 19:43:37 +0000 (UTC) (envelope-from karl@denninger.net) Received: from colo1.denninger.net (colo1.denninger.net [104.236.120.189]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 289AB85F6C for ; Mon, 26 Nov 2018 19:43:37 +0000 (UTC) (envelope-from karl@denninger.net) Received: from denninger.net (ip68-1-57-197.pn.at.cox.net [68.1.57.197]) by colo1.denninger.net (Postfix) with ESMTP id 2716721108C for ; Mon, 26 Nov 2018 14:43:31 -0500 (EST) Received: from [192.168.10.17] (D7.Denninger.Net [192.168.10.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by denninger.net (Postfix) with ESMTPSA id 6D5F2245551 for ; Mon, 26 Nov 2018 13:43:30 -0600 (CST) Subject: Re: Raspberry PI 2B/3 and USB audio To: freebsd-arm@freebsd.org References: <87ftw96uq0.wl-herbert@gojira.at> <6beca923-ba25-3814-6bb2-f4cc2d7360d3@selasky.org> <875zx2hyey.wl-herbert@gojira.at> <87lg5fhcgz.wl-herbert@gojira.at> From: Karl Denninger Openpgp: preference=signencrypt Message-ID: <1418f261-9f56-7931-d23f-85059fdda077@denninger.net> Date: Mon, 26 Nov 2018 13:43:30 -0600 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <87lg5fhcgz.wl-herbert@gojira.at> Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-512; boundary="------------ms060701060201080202030609" X-Rspamd-Queue-Id: 289AB85F6C X-Spamd-Result: default: False [-2.10 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-0.91)[-0.914,0]; FROM_HAS_DN(0.00)[]; SIGNED_SMIME(-2.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-0.36)[-0.361,0]; HAS_ATTACHMENT(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; TO_DN_NONE(0.00)[]; MIME_GOOD(-0.20)[multipart/signed,multipart/alternative,text/plain]; RCPT_COUNT_ONE(0.00)[1]; AUTH_NA(1.00)[]; RCVD_COUNT_THREE(0.00)[3]; DMARC_NA(0.00)[denninger.net]; NEURAL_SPAM_SHORT(0.51)[0.508,0]; MX_GOOD(-0.01)[px.denninger.net]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:14061, ipnet:104.236.64.0/18, country:US]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(-0.13)[ipnet: 104.236.64.0/18(-4.08), asn: 14061(3.54), country: US(-0.09)]; RECEIVED_SPAMHAUS_PBL(0.00)[197.57.1.68.zen.spamhaus.org : 127.0.0.11] X-Rspamd-Server: mx1.freebsd.org X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2018 19:43:38 -0000 This is a cryptographically signed message in MIME format. --------------ms060701060201080202030609 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable This one works fine on my Pi2.... (and it was dirt cheap too) uaudio0 on uhub1 uaudio0: on usbus0 uaudio0: Play: 48000 Hz, 2 ch, 16-bit S-LE PCM format, 2x8ms buffer. uaudio0: Play: 44100 Hz, 2 ch, 16-bit S-LE PCM format, 2x8ms buffer. uaudio0: Record: 48000 Hz, 1 ch, 16-bit S-LE PCM format, 2x8ms buffer. uaudio0: Record: 44100 Hz, 1 ch, 16-bit S-LE PCM format, 2x8ms buffer. uaudio0: No MIDI sequencer. pcm1: on uaudio0 uaudio0: HID volume keys found. It was a no-name, and is a "full speed".... ugen0.6: at usbus0, cfg=3D0 md=3DHOST spd=3DFULL (12Mbps) pwr=3DON (100mA) FreeBSD 11.0-STABLE #1 r313159M: Wed Feb 15 13:36:01 CST 2017=C2=A0=C2=A0= =C2=A0=C2=A0 freebsd@NewFS.denninger.net:/pics/Crochet-work/obj/arm.armv6/pics/CrossBu= ild/src/sys/RPI2 Older kernel and OS, but working fine.=C2=A0 I use it to play synthesized= voice and MP3s. On 11/26/2018 13:21, Herbert J. Skuhra wrote: > On Mon, 12 Nov 2018 20:46:13 +0100, "Herbert J. Skuhra" wrote: >> On Sun, 11 Nov 2018 13:52:14 +0100, Hans Petter Selasky wrote: >>> On 11/10/18 12:24 PM, Herbert J. Skuhra wrote: >>>> Hi, >>>> >>>> if you use an USB sound card on your Raspberry PI 2B/3, can you plea= se >>>> answer the following questions: >>>> >>>> - which USB sound card? >>>> - do you have bad audio on current or stable/12 after r339388? >>>> >>>> My "Creative Technology Ltd Sound Blaster Play 2" device sounds very= >>>> bad. Meanwhile more changes were commited but they don't fix audio >>>> completly. >>>> >>> Hi, >>> >>> Some background: >>> >>> The USB controller in Raspberry PI is running HIGH-speed USB. Many US= B >>> audio device are FULL-speed USB. In order for a FULL-speed USB device= >>> to work in a HIGH-speed USB environment all data transfers need to go= >>> through a so-called transaction translator. This transaction >>> translator operate on chunks of data, 171 bytes maximum. That means i= f >>> a USB audio stream generates 1000 packets per second, then suddenly a= >>> bunch of smaller packets will be needed. This puts some stress on the= >>> DWC OTG driver and there might be some room for improvement in this >>> area too, but the basic sympthom is that the DWC OTG driver in FreeBS= D >>> is not always able to keep up with the timing required for these >>> so-called split transactions. One idea is to move all DWC OTG IRQ >>> handling away from CPU-0. I'm not sure if cpuset supports this yet on= >>> armv7 // arm64. Might have to be done in the driver. >>> >>> Further some audio device use non-adaptive clocks, which means the >>> recording channel must be active along with the playback channel else= >>> jitter will occur. >>> >>> The recommendation for RPI is a HIGH-speed USB audio device (should b= e >>> clearly marked in the specification). Using a HIGH-speed USB audio >>> device will reduce the number of interrupts significantly. >> Well, the sound card worked perfectly fine so far... both on FreeBSD >> and Arch Linux ARM... no luck with NetBSD. Never mind! I am obviously >> the only user affected by this "fix" (r339388). > Unfortunally I've purchased another full-speed usb audio device: > > uaudio0 on uhub1 > uaudio0: on usbus0 > uaudio0: Play: 96000 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer. > uaudio0: Play: 88200 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer. > uaudio0: Play: 48000 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer. > uaudio0: Play: 44100 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer. > uaudio0: Record: 48000 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer. > uaudio0: Record: 44100 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer. > uaudio0: No MIDI sequencer. > pcm0: on uaudio0 > uaudio0: HID volume keys found. > > While it works fine under Linux (pulse), MacOS and Windows, it > produces only bad noise under FreeBSD (Raspberry PI3B)! :-( > > How can I get it working? Can anyone recommend an USB audio device for > FreeBSD? Should DACs from Pro-Ject work? > > Thanks. > > -- > Herbert > _______________________________________________ > freebsd-arm@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" --=20 Karl Denninger karl@denninger.net /The Market Ticker/ /[S/MIME encrypted email preferred]/ --------------ms060701060201080202030609 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature 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 --------------ms060701060201080202030609-- From owner-freebsd-arm@freebsd.org Mon Nov 26 19:47:42 2018 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8D5501142882 for ; Mon, 26 Nov 2018 19:47:42 +0000 (UTC) (envelope-from herbert@gojira.at) Received: from mail.bsd4all.net (mail.bsd4all.net [IPv6:2a01:4f8:191:217b::25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "mail.bsd4all.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D80F48607C for ; Mon, 26 Nov 2018 19:47:41 +0000 (UTC) (envelope-from herbert@gojira.at) Date: Mon, 26 Nov 2018 20:47:40 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=gojira.at; s=mail201809; t=1543261660; bh=NDbz4D1O2pArlXoc+c+r95r2NVHKf+lFyIfdHTGEw1Q=; h=Date:Message-ID:From:To:Subject:MIME-Version:Content-Type:from:to: subject:date:content-type:mime-version:message-id; b=PNNAb1r2YVmtonHie3x/O6QWGp85y/g30Io9Jb/WUsa9ukV0xFgJPlJzms1RbIIB1 ciByuI9V6+mIOcj3tjfcUHGUUFTaCCHoPk1RNm84av4IRndfE6gtwIrnW6icSFWI0h NBH97X8dU8zvPxEho67HXKrcixVsmVz+lPgmU0aI5WVOR/tE2+6oqNl0upXa1UoVFk pQwGi7oLVfeuDhq/HV/f+53IeIJZw8TNw1x4YfHoh/rfCVy3cKISruNYpqGHD6YKu5 STGaNL22RoqBUZ99CrTjh2PaW5aekBzD98fVotl9ACASaae9dHxbA7wluqfaAZ1iTu jY8IghU5QsBmQ== Message-ID: <87k1kzhb8j.wl-herbert@gojira.at> From: "Herbert J. Skuhra" To: freebsd-arm@freebsd.org Subject: Re: Raspberry PI 2B/3 and USB audio In-Reply-To: <87lg5fhcgz.wl-herbert@gojira.at> References: <87ftw96uq0.wl-herbert@gojira.at> <6beca923-ba25-3814-6bb2-f4cc2d7360d3@selasky.org> <875zx2hyey.wl-herbert@gojira.at> <87lg5fhcgz.wl-herbert@gojira.at> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL/10.8 EasyPG/1.0.0 Emacs/27.0 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: D80F48607C X-Spamd-Result: default: False [-3.76 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gojira.at]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a01:4f8:191:217b::25]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[gojira.at]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; DKIM_TRACE(0.00)[gojira.at:+]; MX_GOOD(-0.01)[cached: mail.bsd4all.net]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_SHORT(-0.98)[-0.985,0]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; IP_SCORE(-1.27)[ipnet: 2a01:4f8::/29(-3.52), asn: 24940(-2.81), country: DE(-0.01)]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; RCVD_TLS_ALL(0.00)[] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2018 19:47:42 -0000 On Mon, 26 Nov 2018 20:21:00 +0100, "Herbert J. Skuhra" wrote: > > On Mon, 12 Nov 2018 20:46:13 +0100, "Herbert J. Skuhra" wrote: > > > > On Sun, 11 Nov 2018 13:52:14 +0100, Hans Petter Selasky wrote: > > > > > > On 11/10/18 12:24 PM, Herbert J. Skuhra wrote: > > > > Hi, > > > > > > > > if you use an USB sound card on your Raspberry PI 2B/3, can you please > > > > answer the following questions: > > > > > > > > - which USB sound card? > > > > - do you have bad audio on current or stable/12 after r339388? > > > > > > > > My "Creative Technology Ltd Sound Blaster Play 2" device sounds very > > > > bad. Meanwhile more changes were commited but they don't fix audio > > > > completly. > > > > > > > > > > Hi, > > > > > > Some background: > > > > > > The USB controller in Raspberry PI is running HIGH-speed USB. Many USB > > > audio device are FULL-speed USB. In order for a FULL-speed USB device > > > to work in a HIGH-speed USB environment all data transfers need to go > > > through a so-called transaction translator. This transaction > > > translator operate on chunks of data, 171 bytes maximum. That means if > > > a USB audio stream generates 1000 packets per second, then suddenly a > > > bunch of smaller packets will be needed. This puts some stress on the > > > DWC OTG driver and there might be some room for improvement in this > > > area too, but the basic sympthom is that the DWC OTG driver in FreeBSD > > > is not always able to keep up with the timing required for these > > > so-called split transactions. One idea is to move all DWC OTG IRQ > > > handling away from CPU-0. I'm not sure if cpuset supports this yet on > > > armv7 // arm64. Might have to be done in the driver. > > > > > > Further some audio device use non-adaptive clocks, which means the > > > recording channel must be active along with the playback channel else > > > jitter will occur. > > > > > > The recommendation for RPI is a HIGH-speed USB audio device (should be > > > clearly marked in the specification). Using a HIGH-speed USB audio > > > device will reduce the number of interrupts significantly. > > > > Well, the sound card worked perfectly fine so far... both on FreeBSD > > and Arch Linux ARM... no luck with NetBSD. Never mind! I am obviously > > the only user affected by this "fix" (r339388). > > Unfortunally I've purchased another full-speed usb audio device: > > uaudio0 on uhub1 > uaudio0: on usbus0 > uaudio0: Play: 96000 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer. > uaudio0: Play: 88200 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer. > uaudio0: Play: 48000 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer. > uaudio0: Play: 44100 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer. > uaudio0: Record: 48000 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer. > uaudio0: Record: 44100 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer. > uaudio0: No MIDI sequencer. > pcm0: on uaudio0 > uaudio0: HID volume keys found. > > While it works fine under Linux (pulse), MacOS and Windows, it > produces only bad noise under FreeBSD (Raspberry PI3B)! :-( > > How can I get it working? Can anyone recommend an USB audio device for > FreeBSD? Should DACs from Pro-Ject work? Well, this USB sound card works perfectly fine on my desktop PC running FreeBSD (amd64). -- Herbert From owner-freebsd-arm@freebsd.org Tue Nov 27 07:39:35 2018 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6BAE0113D516 for ; Tue, 27 Nov 2018 07:39:35 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3496C86C47 for ; Tue, 27 Nov 2018 07:39:34 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [178.17.145.230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 9994A2601EC; Tue, 27 Nov 2018 08:39:31 +0100 (CET) Subject: Re: Raspberry PI 2B/3 and USB audio To: "Herbert J. Skuhra" , freebsd-arm@freebsd.org References: <87ftw96uq0.wl-herbert@gojira.at> <6beca923-ba25-3814-6bb2-f4cc2d7360d3@selasky.org> <875zx2hyey.wl-herbert@gojira.at> <87lg5fhcgz.wl-herbert@gojira.at> <87k1kzhb8j.wl-herbert@gojira.at> From: Hans Petter Selasky Message-ID: <9dda25f1-9b52-2a50-1b55-00cccee8ee98@selasky.org> Date: Tue, 27 Nov 2018 08:38:57 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.0.1 MIME-Version: 1.0 In-Reply-To: <87k1kzhb8j.wl-herbert@gojira.at> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 3496C86C47 X-Spamd-Result: default: False [-6.30 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[selasky.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[mail.turbocat.net]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-0.96)[-0.961,0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; IP_SCORE(-3.03)[ip: (-8.65), ipnet: 2a01:4f8::/29(-3.61), asn: 24940(-2.85), country: DE(-0.02)]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; MID_RHS_MATCH_FROM(0.00)[] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Nov 2018 07:39:35 -0000 On 11/26/18 8:47 PM, Herbert J. Skuhra wrote: > Well, this USB sound card works perfectly fine on my desktop PC > running FreeBSD (amd64). Hi, There is a problem in the DWC OTG USB controller driver that it cannot handle the big data payload 24-bit 48KHz sampling requires. Unfortunately your device has only one sample size selection. If you buy a USB sound device marked as "HIGH SPEED USB" it should work. Yours is "spd=FULL". --HPS From owner-freebsd-arm@freebsd.org Wed Nov 28 00:47:09 2018 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A86D211419A5 for ; Wed, 28 Nov 2018 00:47:09 +0000 (UTC) (envelope-from bscott@bunyatech.com.au) Received: from ppp150-101-221-139.static.internode.on.net (2001-44b8-4170-0a00-0000-0000-0000-0002.static.ipv6.internode.on.net [IPv6:2001:44b8:4170:a00::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "150.101.221.139", Issuer "Bunya Technology Certification Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id F285076F89 for ; Wed, 28 Nov 2018 00:47:04 +0000 (UTC) (envelope-from bscott@bunyatech.com.au) X-Clacks-Overhead: GNU Terry Pratchett Received: from DHCP.tawonga.bunyatech.com.au (DHCP.tawonga.bunyatech.com.au [10.0.1.78] (may be forged)) (authenticated bits=0) by cope.tawonga.bunyatech.com.au (8.15.2/8.15.2/MSA) with ESMTPSA id wAS0kwvt034333 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK) for ; Wed, 28 Nov 2018 11:46:58 +1100 (AEDT) (envelope-from bscott@bunyatech.com.au) Subject: Re: Raspberry PI 2B/3 and USB audio To: freebsd-arm@freebsd.org References: <87ftw96uq0.wl-herbert@gojira.at> <6beca923-ba25-3814-6bb2-f4cc2d7360d3@selasky.org> <875zx2hyey.wl-herbert@gojira.at> <87lg5fhcgz.wl-herbert@gojira.at> <87k1kzhb8j.wl-herbert@gojira.at> <9dda25f1-9b52-2a50-1b55-00cccee8ee98@selasky.org> From: Brian Scott Message-ID: <856136a7-c58f-dda0-d50c-f9da55e5eb88@bunyatech.com.au> Date: Wed, 28 Nov 2018 11:46:58 +1100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <9dda25f1-9b52-2a50-1b55-00cccee8ee98@selasky.org> Content-Language: en-US X-Rspamd-Queue-Id: F285076F89 X-Spamd-Result: default: False [-0.38 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-0.97)[-0.968,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2001:44b8:4170:a00::/56]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-0.94)[-0.944,0]; DMARC_NA(0.00)[bunyatech.com.au]; NEURAL_SPAM_SHORT(0.56)[0.557,0]; MX_GOOD(-0.01)[mx01.mailcluster.com.au,mx02.mailcluster.com.au,mx01.mailcluster.com.au,mx02.mailcluster.com.au,mx01.mailcluster.com.au,mx02.mailcluster.com.au,mx01.mailcluster.com.au,mx02.mailcluster.com.au,mx01.mailcluster.com.au,mx02.mailcluster.com.au,mx01.mailcluster.com.au,mx02.mailcluster.com.au]; HFILTER_HELO_IP_A(1.00)[ppp150-101-221-139.static.internode.on.net]; HFILTER_HELO_NORES_A_OR_MX(0.30)[ppp150-101-221-139.static.internode.on.net]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; IP_SCORE(-0.02)[asn: 4739(-0.05), country: AU(-0.04)]; ASN(0.00)[asn:4739, ipnet:2001:44b8::/32, country:AU]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Server: mx1.freebsd.org Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Nov 2018 00:47:10 -0000 On 27/11/18 6:38 pm, Hans Petter Selasky wrote: > On 11/26/18 8:47 PM, Herbert J. Skuhra wrote: >> Well, this USB sound card works perfectly fine on my desktop PC >> running FreeBSD (amd64). > > Hi, > > There is a problem in the DWC OTG USB controller driver that it cannot > handle the big data payload 24-bit 48KHz sampling requires. > Unfortunately your device has only one sample size selection. > > If you buy a USB sound device marked as "HIGH SPEED USB" it should > work. Yours is "spd=FULL". > > --HPS Just an additional data point, This one also sounds like junk but is high speed: ugen0.6: at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (100mA)   bLength = 0x0012   bDescriptorType = 0x0001   bcdUSB = 0x0200   bDeviceClass = 0x0000    bDeviceSubClass = 0x0000   bDeviceProtocol = 0x0000   bMaxPacketSize0 = 0x0040   idVendor = 0x0bda   idProduct = 0x4040   bcdDevice = 0x0000   iManufacturer = 0x0003    iProduct = 0x0001    iSerialNumber = 0x0002  <201405280001>   bNumConfigurations = 0x0001 But I notice that it handles both 48000 and 8000 according to the sound driver. cat /dev/sndstat FreeBSD Audio Driver (64bit 2009061500/aarch64) Installed devices: pcm0: at ? kld snd_uaudio (1p:1v/1r:1v) default     snddev flags=0x2e2     [pcm0:play:dsp0.p0]: spd 48000, fmt 0x00200010, flags 0x00002100, 0x00000004     interrupts 0, underruns 0, feed 0, ready 0 [b:3072/1536/2|bs:4096/2048/2]     channel flags=0x2100     {userland} -> feeder_mixer(0x00200010) -> {hardware}     pcm0:play:dsp0.p0[pcm0:virtual:dsp0.vp0]: spd 8000, fmt 0x00100008, flags 0x10000000, 0x00000000     interrupts 0, underruns 0, feed 0, ready 0 [b:0/0/0|bs:0/0/0]     channel flags=0x10000000     {userland} -> feeder_root(0x00000000) -> {hardware}     [pcm0:record:dsp0.r0]: spd 48000,fmt 0x00200010/0x00210000, flags 0x00002100, 0x00000007     interrupts 0, overruns 0, feed 0, hfree 4608, sfree 4096 [b:4608/2304/2|bs:4096/2048/2]     channel flags=0x2100     {hardware} -> feeder_root(0x00210000) -> feeder_format(0x00210000 -> 0x00200010) -> feeder_mixer(0x00200010) -> {userland}     pcm0:record:dsp0.r0[pcm0:virtual:dsp0.vr0]: spd 8000, fmt 0x00100008, flags 0x10000000, 0x00000000     interrupts 0, overruns 0, feed 0, hfree 0, sfree 0 [b:0/0/0|bs:0/0/0]     channel flags=0x10000000     {hardware} -> feeder_root(0x00000000) -> {userland} No devices installed from userspace. Output sounds like rubbish with both 8000 speed stuff sent directly to /dev/dsp using cat and higher quality stuff sent via sox play. It could also just be a junk piece of hardware from my local electronics shop. Cheers, Brian From owner-freebsd-arm@freebsd.org Wed Nov 28 08:46:17 2018 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 78FE9114C8E7 for ; Wed, 28 Nov 2018 08:46:17 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D48D8873A8 for ; Wed, 28 Nov 2018 08:46:15 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [178.17.145.230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 29F922600F9; Wed, 28 Nov 2018 09:46:14 +0100 (CET) Subject: Re: Raspberry PI 2B/3 and USB audio To: Brian Scott , freebsd-arm@freebsd.org References: <87ftw96uq0.wl-herbert@gojira.at> <6beca923-ba25-3814-6bb2-f4cc2d7360d3@selasky.org> <875zx2hyey.wl-herbert@gojira.at> <87lg5fhcgz.wl-herbert@gojira.at> <87k1kzhb8j.wl-herbert@gojira.at> <9dda25f1-9b52-2a50-1b55-00cccee8ee98@selasky.org> <856136a7-c58f-dda0-d50c-f9da55e5eb88@bunyatech.com.au> From: Hans Petter Selasky Message-ID: Date: Wed, 28 Nov 2018 09:45:40 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.0.1 MIME-Version: 1.0 In-Reply-To: <856136a7-c58f-dda0-d50c-f9da55e5eb88@bunyatech.com.au> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D48D8873A8 X-Spamd-Result: default: False [-6.71 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net]; MX_GOOD(-0.01)[mail.turbocat.net]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; IP_SCORE(-3.45)[ip: (-9.53), ipnet: 88.99.0.0/16(-4.79), asn: 24940(-2.89), country: DE(-0.02)]; ASN(0.00)[asn:24940, ipnet:88.99.0.0/16, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[selasky.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Nov 2018 08:46:17 -0000 On 11/28/18 1:46 AM, Brian Scott wrote: > On 27/11/18 6:38 pm, Hans Petter Selasky wrote: >> On 11/26/18 8:47 PM, Herbert J. Skuhra wrote: >>> Well, this USB sound card works perfectly fine on my desktop PC >>> running FreeBSD (amd64). >> >> Hi, >> >> There is a problem in the DWC OTG USB controller driver that it cannot >> handle the big data payload 24-bit 48KHz sampling requires. >> Unfortunately your device has only one sample size selection. >> >> If you buy a USB sound device marked as "HIGH SPEED USB" it should >> work. Yours is "spd=FULL". >> >> --HPS > Just an additional data point, > > This one also sounds like junk but is high speed: > > ugen0.6: at usbus0, cfg=0 md=HOST spd=HIGH > (480Mbps) pwr=ON (100mA) > >   bLength = 0x0012 >   bDescriptorType = 0x0001 >   bcdUSB = 0x0200 >   bDeviceClass = 0x0000  >   bDeviceSubClass = 0x0000 >   bDeviceProtocol = 0x0000 >   bMaxPacketSize0 = 0x0040 >   idVendor = 0x0bda >   idProduct = 0x4040 >   bcdDevice = 0x0000 >   iManufacturer = 0x0003  >   iProduct = 0x0001  >   iSerialNumber = 0x0002  <201405280001> >   bNumConfigurations = 0x0001 > > But I notice that it handles both 48000 and 8000 according to the sound > driver. > > cat /dev/sndstat > FreeBSD Audio Driver (64bit 2009061500/aarch64) > Installed devices: > pcm0: at ? kld snd_uaudio (1p:1v/1r:1v) default >     snddev flags=0x2e2 >     [pcm0:play:dsp0.p0]: spd 48000, fmt 0x00200010, flags > 0x00002100, 0x00000004 >     interrupts 0, underruns 0, feed 0, ready 0 > [b:3072/1536/2|bs:4096/2048/2] >     channel flags=0x2100 >     {userland} -> feeder_mixer(0x00200010) -> {hardware} >     pcm0:play:dsp0.p0[pcm0:virtual:dsp0.vp0]: spd 8000, fmt > 0x00100008, flags 0x10000000, 0x00000000 >     interrupts 0, underruns 0, feed 0, ready 0 [b:0/0/0|bs:0/0/0] >     channel flags=0x10000000 >     {userland} -> feeder_root(0x00000000) -> {hardware} >     [pcm0:record:dsp0.r0]: spd 48000,fmt 0x00200010/0x00210000, > flags 0x00002100, 0x00000007 >     interrupts 0, overruns 0, feed 0, hfree 4608, sfree 4096 > [b:4608/2304/2|bs:4096/2048/2] >     channel flags=0x2100 >     {hardware} -> feeder_root(0x00210000) -> > feeder_format(0x00210000 -> 0x00200010) -> feeder_mixer(0x00200010) > -> {userland} >     pcm0:record:dsp0.r0[pcm0:virtual:dsp0.vr0]: spd 8000, fmt > 0x00100008, flags 0x10000000, 0x00000000 >     interrupts 0, overruns 0, feed 0, hfree 0, sfree 0 > [b:0/0/0|bs:0/0/0] >     channel flags=0x10000000 >     {hardware} -> feeder_root(0x00000000) -> {userland} > No devices installed from userspace. > > Output sounds like rubbish with both 8000 speed stuff sent directly to > /dev/dsp using cat and higher quality stuff sent via sox play. > > It could also just be a junk piece of hardware from my local electronics > shop. Which version of FreeBSD is this? Can you show dmesg? --HPS From owner-freebsd-arm@freebsd.org Wed Nov 28 10:13:26 2018 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A532114F9DF for ; Wed, 28 Nov 2018 10:13:26 +0000 (UTC) (envelope-from bscott@bunyatech.com.au) Received: from ppp150-101-221-139.static.internode.on.net (2001-44b8-4170-0a00-0000-0000-0000-0002.static.ipv6.internode.on.net [IPv6:2001:44b8:4170:a00::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "150.101.221.139", Issuer "Bunya Technology Certification Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 42C066E287 for ; Wed, 28 Nov 2018 10:13:21 +0000 (UTC) (envelope-from bscott@bunyatech.com.au) X-Clacks-Overhead: GNU Terry Pratchett Received: from DHCP.tawonga.bunyatech.com.au (DHCP.tawonga.bunyatech.com.au [10.0.1.78] (may be forged)) (authenticated bits=0) by cope.tawonga.bunyatech.com.au (8.15.2/8.15.2/MSA) with ESMTPSA id wASADGfD067667 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK); Wed, 28 Nov 2018 21:13:17 +1100 (AEDT) (envelope-from bscott@bunyatech.com.au) Subject: Re: Raspberry PI 2B/3 and USB audio To: Hans Petter Selasky , freebsd-arm@freebsd.org References: <87ftw96uq0.wl-herbert@gojira.at> <6beca923-ba25-3814-6bb2-f4cc2d7360d3@selasky.org> <875zx2hyey.wl-herbert@gojira.at> <87lg5fhcgz.wl-herbert@gojira.at> <87k1kzhb8j.wl-herbert@gojira.at> <9dda25f1-9b52-2a50-1b55-00cccee8ee98@selasky.org> <856136a7-c58f-dda0-d50c-f9da55e5eb88@bunyatech.com.au> From: Brian Scott Message-ID: Date: Wed, 28 Nov 2018 21:13:15 +1100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US X-Rspamd-Queue-Id: 42C066E287 X-Spamd-Result: default: False [-0.72 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-0.98)[-0.979,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2001:44b8:4170:a00::/56]; NEURAL_HAM_LONG(-0.97)[-0.973,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[bunyatech.com.au]; HFILTER_HELO_IP_A(1.00)[ppp150-101-221-139.static.internode.on.net]; HFILTER_HELO_NORES_A_OR_MX(0.30)[ppp150-101-221-139.static.internode.on.net]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_SHORT(0.26)[0.260,0]; MX_GOOD(-0.01)[cached: mx01.mailcluster.com.au]; RCPT_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; IP_SCORE(-0.02)[asn: 4739(-0.05), country: AU(-0.04)]; ASN(0.00)[asn:4739, ipnet:2001:44b8::/32, country:AU]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Nov 2018 10:13:26 -0000 On 28/11/18 7:45 pm, Hans Petter Selasky wrote: > On 11/28/18 1:46 AM, Brian Scott wrote: >> On 27/11/18 6:38 pm, Hans Petter Selasky wrote: >>> On 11/26/18 8:47 PM, Herbert J. Skuhra wrote: >>>> Well, this USB sound card works perfectly fine on my desktop PC >>>> running FreeBSD (amd64). >>> >>> Hi, >>> >>> There is a problem in the DWC OTG USB controller driver that it cannot >>> handle the big data payload 24-bit 48KHz sampling requires. >>> Unfortunately your device has only one sample size selection. >>> >>> If you buy a USB sound device marked as "HIGH SPEED USB" it should >>> work. Yours is "spd=FULL". >>> >>> --HPS >> Just an additional data point, >> >> This one also sounds like junk but is high speed: >> >>      ugen0.6: at usbus0, cfg=0 md=HOST spd=HIGH >>      (480Mbps) pwr=ON (100mA) >> >>        bLength = 0x0012 >>        bDescriptorType = 0x0001 >>        bcdUSB = 0x0200 >>        bDeviceClass = 0x0000  >>        bDeviceSubClass = 0x0000 >>        bDeviceProtocol = 0x0000 >>        bMaxPacketSize0 = 0x0040 >>        idVendor = 0x0bda >>        idProduct = 0x4040 >>        bcdDevice = 0x0000 >>        iManufacturer = 0x0003  >>        iProduct = 0x0001  >>        iSerialNumber = 0x0002  <201405280001> >>        bNumConfigurations = 0x0001 >> >> But I notice that it handles both 48000 and 8000 according to the sound >> driver. >> >>      cat /dev/sndstat >>      FreeBSD Audio Driver (64bit 2009061500/aarch64) >>      Installed devices: >>      pcm0: at ? kld snd_uaudio (1p:1v/1r:1v) default >>          snddev flags=0x2e2 >>          [pcm0:play:dsp0.p0]: spd 48000, fmt 0x00200010, flags >>      0x00002100, 0x00000004 >>          interrupts 0, underruns 0, feed 0, ready 0 >>      [b:3072/1536/2|bs:4096/2048/2] >>          channel flags=0x2100 >>          {userland} -> feeder_mixer(0x00200010) -> {hardware} >>          pcm0:play:dsp0.p0[pcm0:virtual:dsp0.vp0]: spd 8000, fmt >>      0x00100008, flags 0x10000000, 0x00000000 >>          interrupts 0, underruns 0, feed 0, ready 0 [b:0/0/0|bs:0/0/0] >>          channel flags=0x10000000 >>          {userland} -> feeder_root(0x00000000) -> {hardware} >>          [pcm0:record:dsp0.r0]: spd 48000,fmt 0x00200010/0x00210000, >>      flags 0x00002100, 0x00000007 >>          interrupts 0, overruns 0, feed 0, hfree 4608, sfree 4096 >>      [b:4608/2304/2|bs:4096/2048/2] >>          channel flags=0x2100 >>          {hardware} -> feeder_root(0x00210000) -> >>      feeder_format(0x00210000 -> 0x00200010) -> feeder_mixer(0x00200010) >>      -> {userland} >>          pcm0:record:dsp0.r0[pcm0:virtual:dsp0.vr0]: spd 8000, fmt >>      0x00100008, flags 0x10000000, 0x00000000 >>          interrupts 0, overruns 0, feed 0, hfree 0, sfree 0 >>      [b:0/0/0|bs:0/0/0] >>          channel flags=0x10000000 >>          {hardware} -> feeder_root(0x00000000) -> {userland} >>      No devices installed from userspace. >> >> Output sounds like rubbish with both 8000 speed stuff sent directly to >> /dev/dsp using cat and higher quality stuff sent via sox play. >> >> It could also just be a junk piece of hardware from my local electronics >> shop. > > Which version of FreeBSD is this? > > Can you show dmesg? > > --HPS > 12.0 RC2 with /boot and /boot/msdos on sdcard and everything else on USB connected hard drive (causing interference with the bus?). Otherwise everything directly off the RC2 image + packages and a bit of configuration. On repeating my tests (probably last done a few months ago with the current snapshot) the sound was much better than I remember (almost recognisable!). Maybe having the non-debug kernel is helping. Hope this isn't a red herring. ---<>--- Copyright (c) 1992-2018 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994         The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 12.0-RC2 r340839 GENERIC arm64 FreeBSD clang version 6.0.1 (tags/RELEASE_601/final 335540) (based on LLVM 6.0.1) VT(efifb): resolution 1280x1024 KLD file umodem.ko is missing dependencies Starting CPU 1 (1) Starting CPU 2 (2) Starting CPU 3 (3) FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs arc4random: no preloaded entropy cache random: entropy device external interface MAP 7ffe000 mode 2 pages 2 MAP 8007000 mode 2 pages 2 MAP 39f35000 mode 2 pages 1 MAP 39f3a000 mode 2 pages 1 MAP 3b347000 mode 2 pages 1 MAP 3f100000 mode 1 pages 1 kbd0 at kbdmux0 ofwbus0: simplebus0: on ofwbus0 ofw_clkbus0: on ofwbus0 clk_fixed0: on ofw_clkbus0 clk_fixed1: on ofw_clkbus0 regfix0: on ofwbus0 regfix1: on ofwbus0 psci0: on ofwbus0 local_intc0: mem 0x40000000-0x400000ff on simplebus0 intc0: mem 0x7e00b200-0x7e00b3ff irq 20 on simplebus0 gpio0: mem 0x7e200000-0x7e2000b3 irq 22,23 on simplebus0 gpiobus0: on gpio0 generic_timer0: irq 0,1,2,3 on ofwbus0 Timecounter "ARM MPCore Timecounter" frequency 19200000 Hz quality 1000 Event timer "ARM MPCore Eventtimer" frequency 19200000 Hz quality 1000 gpiopps0: on ofwbus0 gpiopps0: PPS input on gpio0 pin 18 bcm_dma0: mem 0x7e007000-0x7e007eff irq 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19 on simplebus0 bcmwd0: mem 0x7e100000-0x7e100027 on simplebus0 bcmrng0: mem 0x7e104000-0x7e10400f on simplebus0 mbox0: mem 0x7e00b880-0x7e00b8bf irq 21 on simplebus0 gpioc0: on gpio0 uart0: mem 0x7e201000-0x7e201fff irq 24 on simplebus0 spi0: mem 0x7e204000-0x7e204fff irq 26 on simplebus0 spibus0: on spi0 spibus0: at cs 0 mode 0 spibus0: at cs 1 mode 0 iichb0: mem 0x7e804000-0x7e804fff irq 37 on simplebus0 bcm283x_dwcotg0: mem 0x7e980000-0x7e98ffff,0x7e006000-0x7e006fff irq 43,44 on simplebus0 usbus0 on bcm283x_dwcotg0 sdhci_bcm0: mem 0x7e300000-0x7e3000ff irq 46 on simplebus0 mmc0: on sdhci_bcm0 fb0: on simplebus0 fbd0 on fb0 VT: Replacing driver "efifb" with new "fb". fb0: 1280x1024(1280x1024@0,0) 24bpp fb0: fbswap: 1, pitch 3840, base 0x3e83a000, screen_size 3932160 pmu0: irq 50 on simplebus0 cpulist0: on ofwbus0 cpu0: on cpulist0 bcm2835_cpufreq0: on cpu0 cpu1: on cpulist0 cpu2: on cpulist0 cpu3: on cpulist0 gpioled0: on ofwbus0 gpioled0: failed to map pin gpioled0: failed to map pin cryptosoft0: Timecounters tick every 1.000 msec iicbus0: on iichb0 iic0: on iicbus0 ds32310: at addr 0xd0 on iicbus0 usbus0: 480Mbps High Speed USB v2.0 ugen0.1: at usbus0 uhub0: on usbus0 mmcsd0: 2GB at mmc0 25.0MHz/4bit/65535-block bcm2835_cpufreq0: ARM 600MHz, Core 250MHz, SDRAM 400MHz, Turbo OFF ds32310: registered as a time-of-day clock, resolution 1.000000s uhub0: 1 port with 1 removable, self powered ugen0.2: at usbus0 uhub1 on uhub0 uhub1: on usbus0 uhub1: MTT enabled uhub1: 5 ports with 4 removable, self powered ugen0.3: at usbus0 smsc0 on uhub1 smsc0: on usbus0 smsc0: chip 0xec00, rev. 0002 miibus0: on smsc0 smscphy0: PHY 1 on miibus0 smscphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto ue0: on smsc0 ue0: Ethernet address: b8:27:eb:4b:18:8c ugen0.4: at usbus0 umass0 on uhub1 umass0: on usbus0 Release APs...random: unblocking device. arc4random: no preloaded entropy cache done CPU  0: ARM Cortex-A53 r0p4 affinity:  0  Instruction Set Attributes 0 = da0 at umass-sim0 bus 0 scbus0 target 0 lun 0 da0: Fixed Direct Access SPC-4 SCSI device da0: Serial Number NA88TLH2 da0: 40.000MB/s transfers da0: 953869MB (1953525167 512 byte sectors) da0: quirks=0x2  Instruction Set Attributes 1 = <>          Processor Features 0 =          Processor Features 1 = <0>       Memory Model Features 0 = <4k Granule,64k Granule,MixedEndian,S/NS Mem,16bit ASID,1TB PA>       Memory Model Features 1 = <> Trying to mount root from ufs:/dev/ufs/pi3_hdd []...       Memory Model Features 2 = <32b CCIDX,48b VA>              Debug Features 0 = <2 CTX Breakpoints,4 Watchpoints,6 Breakpoints,PMUv3,Debug v8>              Debug Features 1 = <0>          Auxiliary Features 0 = <0>          Auxiliary Features 1 = <0> CPU  1: ARM Cortex-A53 r0p4 affinity:  1 CPU  2: ARM Cortex-A53 r0p4 affinity:  2 CPU  3: ARM Cortex-A53 r0p4 affinity:  3 arc4random: no preloaded entropy cache arc4random: no preloaded entropy cache ugen0.5: at usbus0 ukbd0 on uhub1 ukbd0: on usbus0 kbd1 at ukbd0 (da0:umass-sim0:0:0:0): READ(10). CDB: 28 00 00 53 b9 68 00 00 08 00 (da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error (da0:umass-sim0:0:0:0): Retrying command, 3 more tries remain ugen0.6: at usbus0 lo0: link state changed to UP smsc0: chip 0xec00, rev. 0002 ue0: link state changed to DOWN ue0: link state changed to UP ums0 on uhub1 ums0: on usbus0 ums0: 16 buttons and [XYZT] coordinates ID=2 uhid0 on uhub1 uhid0: on usbus0 uhid1 on uhub1 uhid1: on usbus0 uaudio0 on uhub1 uaudio0: on usbus0 uaudio0: Play: 48000 Hz, 2 ch, 16-bit S-LE PCM format, 2x8ms buffer. uaudio0: Play: 44100 Hz, 2 ch, 16-bit S-LE PCM format, 2x8ms buffer. uaudio0: Record: 96000 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer. uaudio0: Record: 48000 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer. uaudio0: Record: 44100 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer. uaudio0: No MIDI sequencer. pcm0: on uaudio0 uaudio0: No HID volume keys found. From owner-freebsd-arm@freebsd.org Wed Nov 28 10:22:52 2018 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF348114FC82 for ; Wed, 28 Nov 2018 10:22:51 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3ADD36E67E for ; Wed, 28 Nov 2018 10:22:50 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [178.17.145.230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id A726E260433; Wed, 28 Nov 2018 11:22:48 +0100 (CET) Subject: Re: Raspberry PI 2B/3 and USB audio To: Brian Scott , freebsd-arm@freebsd.org References: <87ftw96uq0.wl-herbert@gojira.at> <6beca923-ba25-3814-6bb2-f4cc2d7360d3@selasky.org> <875zx2hyey.wl-herbert@gojira.at> <87lg5fhcgz.wl-herbert@gojira.at> <87k1kzhb8j.wl-herbert@gojira.at> <9dda25f1-9b52-2a50-1b55-00cccee8ee98@selasky.org> <856136a7-c58f-dda0-d50c-f9da55e5eb88@bunyatech.com.au> From: Hans Petter Selasky Message-ID: Date: Wed, 28 Nov 2018 11:22:14 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.0.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3ADD36E67E X-Spamd-Result: default: False [-6.28 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[selasky.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: mail.turbocat.net]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-0.88)[-0.882,0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; IP_SCORE(-3.09)[ip: (-8.73), ipnet: 2a01:4f8::/29(-3.79), asn: 24940(-2.89), country: DE(-0.02)]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; MID_RHS_MATCH_FROM(0.00)[] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Nov 2018 10:22:52 -0000 On 11/28/18 11:13 AM, Brian Scott wrote: > On 28/11/18 7:45 pm, Hans Petter Selasky wrote: >> On 11/28/18 1:46 AM, Brian Scott wrote: >>> On 27/11/18 6:38 pm, Hans Petter Selasky wrote: >>>> On 11/26/18 8:47 PM, Herbert J. Skuhra wrote: >>>>> Well, this USB sound card works perfectly fine on my desktop PC >>>>> running FreeBSD (amd64). >>>> >>>> Hi, >>>> >>>> There is a problem in the DWC OTG USB controller driver that it cannot >>>> handle the big data payload 24-bit 48KHz sampling requires. >>>> Unfortunately your device has only one sample size selection. >>>> >>>> If you buy a USB sound device marked as "HIGH SPEED USB" it should >>>> work. Yours is "spd=FULL". >>>> >>>> --HPS >>> Just an additional data point, >>> >>> This one also sounds like junk but is high speed: >>> >>>      ugen0.6: at usbus0, cfg=0 md=HOST spd=HIGH >>>      (480Mbps) pwr=ON (100mA) >>> >>>        bLength = 0x0012 >>>        bDescriptorType = 0x0001 >>>        bcdUSB = 0x0200 >>>        bDeviceClass = 0x0000  >>>        bDeviceSubClass = 0x0000 >>>        bDeviceProtocol = 0x0000 >>>        bMaxPacketSize0 = 0x0040 >>>        idVendor = 0x0bda >>>        idProduct = 0x4040 >>>        bcdDevice = 0x0000 >>>        iManufacturer = 0x0003  >>>        iProduct = 0x0001  >>>        iSerialNumber = 0x0002  <201405280001> >>>        bNumConfigurations = 0x0001 >>> >>> But I notice that it handles both 48000 and 8000 according to the sound >>> driver. >>> >>>      cat /dev/sndstat >>>      FreeBSD Audio Driver (64bit 2009061500/aarch64) >>>      Installed devices: >>>      pcm0: at ? kld snd_uaudio (1p:1v/1r:1v) default >>>          snddev flags=0x2e2 >>>          [pcm0:play:dsp0.p0]: spd 48000, fmt 0x00200010, flags >>>      0x00002100, 0x00000004 >>>          interrupts 0, underruns 0, feed 0, ready 0 >>>      [b:3072/1536/2|bs:4096/2048/2] >>>          channel flags=0x2100 >>>          {userland} -> feeder_mixer(0x00200010) -> {hardware} >>>          pcm0:play:dsp0.p0[pcm0:virtual:dsp0.vp0]: spd 8000, fmt >>>      0x00100008, flags 0x10000000, 0x00000000 >>>          interrupts 0, underruns 0, feed 0, ready 0 [b:0/0/0|bs:0/0/0] >>>          channel flags=0x10000000 >>>          {userland} -> feeder_root(0x00000000) -> {hardware} >>>          [pcm0:record:dsp0.r0]: spd 48000,fmt 0x00200010/0x00210000, >>>      flags 0x00002100, 0x00000007 >>>          interrupts 0, overruns 0, feed 0, hfree 4608, sfree 4096 >>>      [b:4608/2304/2|bs:4096/2048/2] >>>          channel flags=0x2100 >>>          {hardware} -> feeder_root(0x00210000) -> >>>      feeder_format(0x00210000 -> 0x00200010) -> feeder_mixer(0x00200010) >>>      -> {userland} >>>          pcm0:record:dsp0.r0[pcm0:virtual:dsp0.vr0]: spd 8000, fmt >>>      0x00100008, flags 0x10000000, 0x00000000 >>>          interrupts 0, overruns 0, feed 0, hfree 0, sfree 0 >>>      [b:0/0/0|bs:0/0/0] >>>          channel flags=0x10000000 >>>          {hardware} -> feeder_root(0x00000000) -> {userland} >>>      No devices installed from userspace. >>> >>> Output sounds like rubbish with both 8000 speed stuff sent directly to >>> /dev/dsp using cat and higher quality stuff sent via sox play. >>> >>> It could also just be a junk piece of hardware from my local electronics >>> shop. >> >> Which version of FreeBSD is this? >> >> Can you show dmesg? >> >> --HPS >> > 12.0 RC2 with /boot and /boot/msdos on sdcard and everything else on USB > connected hard drive (causing interference with the bus?). Otherwise > everything directly off the RC2 image + packages and a bit of configuration. > > On repeating my tests (probably last done a few months ago with the > current snapshot) the sound was much better than I remember (almost > recognisable!). Maybe having the non-debug kernel is helping. Hope this > isn't a red herring. > Can you set the: sysctl dev.pcm.0.play.vchanrate=48000 sysctl dev.pcm.0.rec.vchanrate=48000 And try again? --HPS From owner-freebsd-arm@freebsd.org Wed Nov 28 10:28:49 2018 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A867D114FD5C for ; Wed, 28 Nov 2018 10:28:49 +0000 (UTC) (envelope-from bscott@bunyatech.com.au) Received: from ppp150-101-221-139.static.internode.on.net (2001-44b8-4170-0a00-0000-0000-0000-0002.static.ipv6.internode.on.net [IPv6:2001:44b8:4170:a00::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "150.101.221.139", Issuer "Bunya Technology Certification Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 99F306E773 for ; Wed, 28 Nov 2018 10:28:46 +0000 (UTC) (envelope-from bscott@bunyatech.com.au) X-Clacks-Overhead: GNU Terry Pratchett Received: from DHCP.tawonga.bunyatech.com.au (DHCP.tawonga.bunyatech.com.au [10.0.1.78] (may be forged)) (authenticated bits=0) by cope.tawonga.bunyatech.com.au (8.15.2/8.15.2/MSA) with ESMTPSA id wASASgwP068473 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK); Wed, 28 Nov 2018 21:28:42 +1100 (AEDT) (envelope-from bscott@bunyatech.com.au) Subject: Re: Raspberry PI 2B/3 and USB audio To: Hans Petter Selasky , freebsd-arm@freebsd.org References: <87ftw96uq0.wl-herbert@gojira.at> <6beca923-ba25-3814-6bb2-f4cc2d7360d3@selasky.org> <875zx2hyey.wl-herbert@gojira.at> <87lg5fhcgz.wl-herbert@gojira.at> <87k1kzhb8j.wl-herbert@gojira.at> <9dda25f1-9b52-2a50-1b55-00cccee8ee98@selasky.org> <856136a7-c58f-dda0-d50c-f9da55e5eb88@bunyatech.com.au> From: Brian Scott Message-ID: <7bee717d-70e5-5f09-d5c4-96c72ddbd2f9@bunyatech.com.au> Date: Wed, 28 Nov 2018 21:28:42 +1100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US X-Rspamd-Queue-Id: 99F306E773 X-Spamd-Result: default: False [-0.31 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2001:44b8:4170:a00::/56]; HFILTER_HELO_IP_A(1.00)[ppp150-101-221-139.static.internode.on.net]; HFILTER_HELO_NORES_A_OR_MX(0.30)[ppp150-101-221-139.static.internode.on.net]; MX_GOOD(-0.01)[cached: mx01.mailcluster.com.au]; RCPT_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; IP_SCORE(-0.02)[asn: 4739(-0.05), country: AU(-0.04)]; ASN(0.00)[asn:4739, ipnet:2001:44b8::/32, country:AU]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.98)[-0.980,0]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.68)[0.676,0]; NEURAL_HAM_LONG(-0.97)[-0.975,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[bunyatech.com.au]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Nov 2018 10:28:49 -0000 On 28/11/18 9:22 pm, Hans Petter Selasky wrote: > On 11/28/18 11:13 AM, Brian Scott wrote: >> On 28/11/18 7:45 pm, Hans Petter Selasky wrote: >>> On 11/28/18 1:46 AM, Brian Scott wrote: >>>> On 27/11/18 6:38 pm, Hans Petter Selasky wrote: >>>>> On 11/26/18 8:47 PM, Herbert J. Skuhra wrote: >>>>>> Well, this USB sound card works perfectly fine on my desktop PC >>>>>> running FreeBSD (amd64). >>>>> >>>>> Hi, >>>>> >>>>> There is a problem in the DWC OTG USB controller driver that it >>>>> cannot >>>>> handle the big data payload 24-bit 48KHz sampling requires. >>>>> Unfortunately your device has only one sample size selection. >>>>> >>>>> If you buy a USB sound device marked as "HIGH SPEED USB" it should >>>>> work. Yours is "spd=FULL". >>>>> >>>>> --HPS >>>> Just an additional data point, >>>> >>>> This one also sounds like junk but is high speed: >>>> >>>>       ugen0.6: at usbus0, cfg=0 md=HOST spd=HIGH >>>>       (480Mbps) pwr=ON (100mA) >>>> >>>>         bLength = 0x0012 >>>>         bDescriptorType = 0x0001 >>>>         bcdUSB = 0x0200 >>>>         bDeviceClass = 0x0000  >>>>         bDeviceSubClass = 0x0000 >>>>         bDeviceProtocol = 0x0000 >>>>         bMaxPacketSize0 = 0x0040 >>>>         idVendor = 0x0bda >>>>         idProduct = 0x4040 >>>>         bcdDevice = 0x0000 >>>>         iManufacturer = 0x0003  >>>>         iProduct = 0x0001  >>>>         iSerialNumber = 0x0002  <201405280001> >>>>         bNumConfigurations = 0x0001 >>>> >>>> But I notice that it handles both 48000 and 8000 according to the >>>> sound >>>> driver. >>>> >>>>       cat /dev/sndstat >>>>       FreeBSD Audio Driver (64bit 2009061500/aarch64) >>>>       Installed devices: >>>>       pcm0: at ? kld snd_uaudio (1p:1v/1r:1v) default >>>>           snddev flags=0x2e2 >>>>           [pcm0:play:dsp0.p0]: spd 48000, fmt 0x00200010, flags >>>>       0x00002100, 0x00000004 >>>>           interrupts 0, underruns 0, feed 0, ready 0 >>>>       [b:3072/1536/2|bs:4096/2048/2] >>>>           channel flags=0x2100 >>>>           {userland} -> feeder_mixer(0x00200010) -> {hardware} >>>>           pcm0:play:dsp0.p0[pcm0:virtual:dsp0.vp0]: spd 8000, fmt >>>>       0x00100008, flags 0x10000000, 0x00000000 >>>>           interrupts 0, underruns 0, feed 0, ready 0 >>>> [b:0/0/0|bs:0/0/0] >>>>           channel flags=0x10000000 >>>>           {userland} -> feeder_root(0x00000000) -> {hardware} >>>>           [pcm0:record:dsp0.r0]: spd 48000,fmt 0x00200010/0x00210000, >>>>       flags 0x00002100, 0x00000007 >>>>           interrupts 0, overruns 0, feed 0, hfree 4608, sfree 4096 >>>>       [b:4608/2304/2|bs:4096/2048/2] >>>>           channel flags=0x2100 >>>>           {hardware} -> feeder_root(0x00210000) -> >>>>       feeder_format(0x00210000 -> 0x00200010) -> >>>> feeder_mixer(0x00200010) >>>>       -> {userland} >>>>           pcm0:record:dsp0.r0[pcm0:virtual:dsp0.vr0]: spd 8000, fmt >>>>       0x00100008, flags 0x10000000, 0x00000000 >>>>           interrupts 0, overruns 0, feed 0, hfree 0, sfree 0 >>>>       [b:0/0/0|bs:0/0/0] >>>>           channel flags=0x10000000 >>>>           {hardware} -> feeder_root(0x00000000) -> {userland} >>>>       No devices installed from userspace. >>>> >>>> Output sounds like rubbish with both 8000 speed stuff sent directly to >>>> /dev/dsp using cat and higher quality stuff sent via sox play. >>>> >>>> It could also just be a junk piece of hardware from my local >>>> electronics >>>> shop. >>> >>> Which version of FreeBSD is this? >>> >>> Can you show dmesg? >>> >>> --HPS >>> >> 12.0 RC2 with /boot and /boot/msdos on sdcard and everything else on USB >> connected hard drive (causing interference with the bus?). Otherwise >> everything directly off the RC2 image + packages and a bit of >> configuration. >> >> On repeating my tests (probably last done a few months ago with the >> current snapshot) the sound was much better than I remember (almost >> recognisable!). Maybe having the non-debug kernel is helping. Hope this >> isn't a red herring. >> > > Can you set the: > > sysctl dev.pcm.0.play.vchanrate=48000 > sysctl dev.pcm.0.rec.vchanrate=48000 > > And try again? > > --HPS Already set: #sysctl dev.pcm.0 dev.pcm.0.feedback_rate: 0 dev.pcm.0.mixer.mute_4.desc: 201405280001 dev.pcm.0.mixer.mute_4.max: 1 dev.pcm.0.mixer.mute_4.min: 0 dev.pcm.0.mixer.mute_4.val: 1 dev.pcm.0.mixer.vol_3_1.desc: 201405280001 dev.pcm.0.mixer.vol_3_1.max: 0 dev.pcm.0.mixer.vol_3_1.min: -16800 dev.pcm.0.mixer.vol_3_1.val: -2153 dev.pcm.0.mixer.vol_3_0.desc: 201405280001 dev.pcm.0.mixer.vol_3_0.max: 0 dev.pcm.0.mixer.vol_3_0.min: -16800 dev.pcm.0.mixer.vol_3_0.val: -2153 dev.pcm.0.mixer.mute_2.desc: 201405280001 dev.pcm.0.mixer.mute_2.max: 1 dev.pcm.0.mixer.mute_2.min: 0 dev.pcm.0.mixer.mute_2.val: 1 dev.pcm.0.mixer.vol_1_1.desc: 201405280001 dev.pcm.0.mixer.vol_1_1.max: 0 dev.pcm.0.mixer.vol_1_1.min: -8576 dev.pcm.0.mixer.vol_1_1.val: -2153 dev.pcm.0.mixer.vol_1_0.desc: 201405280001 dev.pcm.0.mixer.vol_1_0.max: 0 dev.pcm.0.mixer.vol_1_0.min: -8576 dev.pcm.0.mixer.vol_1_0.val: -2153 dev.pcm.0.mixer.(null)_0.desc: dev.pcm.0.mixer.(null)_0.max: 1 dev.pcm.0.mixer.(null)_0.min: 0 dev.pcm.0.mixer.(null)_0.val: 1 dev.pcm.0.bitperfect: 0 dev.pcm.0.buffersize: 0 dev.pcm.0.rec.vchanformat: s16le:2.0 dev.pcm.0.rec.vchanrate: 48000 dev.pcm.0.rec.vchanmode: fixed dev.pcm.0.rec.vchans: 1 dev.pcm.0.play.vchanformat: s16le:2.0 dev.pcm.0.play.vchanrate: 48000 dev.pcm.0.play.vchanmode: fixed dev.pcm.0.play.vchans: 1 dev.pcm.0.hwvol_mixer: vol dev.pcm.0.hwvol_step: 5 dev.pcm.0.%parent: uaudio0 dev.pcm.0.%pnpinfo: dev.pcm.0.%location: dev.pcm.0.%driver: pcm dev.pcm.0.%desc: USB audio From owner-freebsd-arm@freebsd.org Wed Nov 28 11:41:22 2018 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2419D1151804 for ; Wed, 28 Nov 2018 11:41:22 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7A4A970A16 for ; Wed, 28 Nov 2018 11:41:21 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [178.17.145.230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 6D57E2604F9; Wed, 28 Nov 2018 12:41:19 +0100 (CET) Subject: Re: Raspberry PI 2B/3 and USB audio To: Brian Scott , freebsd-arm@freebsd.org References: <87ftw96uq0.wl-herbert@gojira.at> <6beca923-ba25-3814-6bb2-f4cc2d7360d3@selasky.org> <875zx2hyey.wl-herbert@gojira.at> <87lg5fhcgz.wl-herbert@gojira.at> <87k1kzhb8j.wl-herbert@gojira.at> <9dda25f1-9b52-2a50-1b55-00cccee8ee98@selasky.org> <856136a7-c58f-dda0-d50c-f9da55e5eb88@bunyatech.com.au> <7bee717d-70e5-5f09-d5c4-96c72ddbd2f9@bunyatech.com.au> From: Hans Petter Selasky Message-ID: Date: Wed, 28 Nov 2018 12:40:44 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.0.1 MIME-Version: 1.0 In-Reply-To: <7bee717d-70e5-5f09-d5c4-96c72ddbd2f9@bunyatech.com.au> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7A4A970A16 X-Spamd-Result: default: False [-6.36 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[selasky.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: mail.turbocat.net]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-0.95)[-0.946,0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; IP_SCORE(-3.10)[ip: (-8.80), ipnet: 2a01:4f8::/29(-3.80), asn: 24940(-2.89), country: DE(-0.02)]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; MID_RHS_MATCH_FROM(0.00)[] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Nov 2018 11:41:22 -0000 On 11/28/18 11:28 AM, Brian Scott wrote: > On 28/11/18 9:22 pm, Hans Petter Selasky wrote: >> On 11/28/18 11:13 AM, Brian Scott wrote: >>> On 28/11/18 7:45 pm, Hans Petter Selasky wrote: >>>> On 11/28/18 1:46 AM, Brian Scott wrote: >>>>> On 27/11/18 6:38 pm, Hans Petter Selasky wrote: >>>>>> On 11/26/18 8:47 PM, Herbert J. Skuhra wrote: >>>>>>> Well, this USB sound card works perfectly fine on my desktop PC >>>>>>> running FreeBSD (amd64). >>>>>> >>>>>> Hi, >>>>>> >>>>>> There is a problem in the DWC OTG USB controller driver that it >>>>>> cannot >>>>>> handle the big data payload 24-bit 48KHz sampling requires. >>>>>> Unfortunately your device has only one sample size selection. >>>>>> >>>>>> If you buy a USB sound device marked as "HIGH SPEED USB" it should >>>>>> work. Yours is "spd=FULL". >>>>>> >>>>>> --HPS >>>>> Just an additional data point, >>>>> >>>>> This one also sounds like junk but is high speed: >>>>> >>>>>       ugen0.6: at usbus0, cfg=0 md=HOST spd=HIGH >>>>>       (480Mbps) pwr=ON (100mA) >>>>> >>>>>         bLength = 0x0012 >>>>>         bDescriptorType = 0x0001 >>>>>         bcdUSB = 0x0200 >>>>>         bDeviceClass = 0x0000  >>>>>         bDeviceSubClass = 0x0000 >>>>>         bDeviceProtocol = 0x0000 >>>>>         bMaxPacketSize0 = 0x0040 >>>>>         idVendor = 0x0bda >>>>>         idProduct = 0x4040 >>>>>         bcdDevice = 0x0000 >>>>>         iManufacturer = 0x0003  >>>>>         iProduct = 0x0001  >>>>>         iSerialNumber = 0x0002  <201405280001> >>>>>         bNumConfigurations = 0x0001 >>>>> Hi, Can you also dump the device descriptors? usbconfig -d 0.6 dump_curr_config_desc And can you capture with usbdump some traffic while doing playback? usbdump -i usbus0 -f 6 -s 65536 -vvv > ~/log.txt And this device works fine using a regular PC with FreeBSD installed? --HPS From owner-freebsd-arm@freebsd.org Thu Nov 29 03:14:45 2018 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB181114ACD4 for ; Thu, 29 Nov 2018 03:14:44 +0000 (UTC) (envelope-from bscott@bunyatech.com.au) Received: from ppp150-101-221-139.static.internode.on.net (2001-44b8-4170-0a00-0000-0000-0000-0002.static.ipv6.internode.on.net [IPv6:2001:44b8:4170:a00::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "150.101.221.139", Issuer "Bunya Technology Certification Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id A5AFF6FCDA for ; Thu, 29 Nov 2018 03:14:40 +0000 (UTC) (envelope-from bscott@bunyatech.com.au) X-Clacks-Overhead: GNU Terry Pratchett Received: from DHCP.tawonga.bunyatech.com.au (DHCP.tawonga.bunyatech.com.au [10.0.1.78] (may be forged)) (authenticated bits=0) by cope.tawonga.bunyatech.com.au (8.15.2/8.15.2/MSA) with ESMTPSA id wAT3EVpo025770 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK); Thu, 29 Nov 2018 14:14:31 +1100 (AEDT) (envelope-from bscott@bunyatech.com.au) Subject: Re: Raspberry PI 2B/3 and USB audio To: Hans Petter Selasky , freebsd-arm@freebsd.org References: <87ftw96uq0.wl-herbert@gojira.at> <6beca923-ba25-3814-6bb2-f4cc2d7360d3@selasky.org> <875zx2hyey.wl-herbert@gojira.at> <87lg5fhcgz.wl-herbert@gojira.at> <87k1kzhb8j.wl-herbert@gojira.at> <9dda25f1-9b52-2a50-1b55-00cccee8ee98@selasky.org> <856136a7-c58f-dda0-d50c-f9da55e5eb88@bunyatech.com.au> <7bee717d-70e5-5f09-d5c4-96c72ddbd2f9@bunyatech.com.au> From: Brian Scott Message-ID: <37f11c35-1b05-da8d-ff20-aad07de860ec@bunyatech.com.au> Date: Thu, 29 Nov 2018 14:14:31 +1100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US X-Rspamd-Queue-Id: A5AFF6FCDA X-Spamd-Result: default: False [-0.06 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2001:44b8:4170:a00::/56]; NEURAL_HAM_LONG(-0.98)[-0.975,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[bunyatech.com.au]; HFILTER_HELO_IP_A(1.00)[ppp150-101-221-139.static.internode.on.net]; HFILTER_HELO_NORES_A_OR_MX(0.30)[ppp150-101-221-139.static.internode.on.net]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_SHORT(0.91)[0.907,0]; MX_GOOD(-0.01)[mx01.mailcluster.com.au,mx02.mailcluster.com.au,mx01.mailcluster.com.au,mx02.mailcluster.com.au,mx01.mailcluster.com.au,mx02.mailcluster.com.au,mx01.mailcluster.com.au,mx02.mailcluster.com.au,mx01.mailcluster.com.au,mx02.mailcluster.com.au,mx01.mailcluster.com.au,mx02.mailcluster.com.au,mx01.mailcluster.com.au,mx02.mailcluster.com.au]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_MEDIUM(-0.97)[-0.968,0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; IP_SCORE(-0.02)[asn: 4739(-0.05), country: AU(-0.04)]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:4739, ipnet:2001:44b8::/32, country:AU]; MID_RHS_MATCH_FROM(0.00)[] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Nov 2018 03:14:45 -0000 On 28/11/18 10:40 pm, Hans Petter Selasky wrote: > On 11/28/18 11:28 AM, Brian Scott wrote: >> On 28/11/18 9:22 pm, Hans Petter Selasky wrote: >>> On 11/28/18 11:13 AM, Brian Scott wrote: >>>> On 28/11/18 7:45 pm, Hans Petter Selasky wrote: >>>>> On 11/28/18 1:46 AM, Brian Scott wrote: >>>>>> On 27/11/18 6:38 pm, Hans Petter Selasky wrote: >>>>>>> On 11/26/18 8:47 PM, Herbert J. Skuhra wrote: >>>>>>>> Well, this USB sound card works perfectly fine on my desktop PC >>>>>>>> running FreeBSD (amd64). >>>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> There is a problem in the DWC OTG USB controller driver that it >>>>>>> cannot >>>>>>> handle the big data payload 24-bit 48KHz sampling requires. >>>>>>> Unfortunately your device has only one sample size selection. >>>>>>> >>>>>>> If you buy a USB sound device marked as "HIGH SPEED USB" it should >>>>>>> work. Yours is "spd=FULL". >>>>>>> >>>>>>> --HPS >>>>>> Just an additional data point, >>>>>> >>>>>> This one also sounds like junk but is high speed: >>>>>> >>>>>>        ugen0.6: at usbus0, cfg=0 md=HOST >>>>>> spd=HIGH >>>>>>        (480Mbps) pwr=ON (100mA) >>>>>> >>>>>>          bLength = 0x0012 >>>>>>          bDescriptorType = 0x0001 >>>>>>          bcdUSB = 0x0200 >>>>>>          bDeviceClass = 0x0000  >>>>>>          bDeviceSubClass = 0x0000 >>>>>>          bDeviceProtocol = 0x0000 >>>>>>          bMaxPacketSize0 = 0x0040 >>>>>>          idVendor = 0x0bda >>>>>>          idProduct = 0x4040 >>>>>>          bcdDevice = 0x0000 >>>>>>          iManufacturer = 0x0003  >>>>>>          iProduct = 0x0001  >>>>>>          iSerialNumber = 0x0002  <201405280001> >>>>>>          bNumConfigurations = 0x0001 >>>>>> > > Hi, > > Can you also dump the device descriptors? > > usbconfig -d 0.6 dump_curr_config_desc > # usbconfig -d 0.6 dump_curr_config_desc ugen0.6: at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (100mA)  Configuration index 0     bLength = 0x0009     bDescriptorType = 0x0002     wTotalLength = 0x01fb     bNumInterfaces = 0x0004     bConfigurationValue = 0x0001     iConfiguration = 0x0004      bmAttributes = 0x00a0     bMaxPower = 0x0032     Interface 0       bLength = 0x0009       bDescriptorType = 0x0004       bInterfaceNumber = 0x0000       bAlternateSetting = 0x0000       bNumEndpoints = 0x0001       bInterfaceClass = 0x0001