**** BEGIN LOGGING AT Thu Jun 01 03:00:02 2017 Jun 01 03:55:10 Hello everyone. Jun 01 09:37:51 hi Jun 01 09:38:20 anyone there? Jun 01 14:08:04 Revisiting yesterday's x15/pci not configured issue... Jun 01 14:08:43 I've built the kernel with all of the pci modules and the intel iwlwifi and booted up the custom am57x board I have Jun 01 14:08:56 lspci doesn't show anything however Jun 01 14:10:06 I'm trying to figure out what to look at next... another missing kernel defconfig option or maybe this is a dtb concern Jun 01 15:03:50 ... it was a dtb issue, I'm back in business Jun 01 15:40:05 dtb was behind it all.... again! Jun 01 18:01:46 hello Jun 01 18:01:59 anybody here that knows about using the McASP as input? Jun 01 18:46:17 halfgaar: we're using mcasp for in & out yes Jun 01 18:50:55 zmatt: I'm having an issue with voltage drop on the bus lines Jun 01 18:51:17 uhhhh Jun 01 18:51:32 voltage drop? what do you mean by that exactly? Jun 01 18:51:42 I actually just posted on the E2E: https://e2e.ti.com/support/arm/sitara_arm/f/791/t/599957 Jun 01 18:52:13 sorry for the bad layout, the forum did that after I posted Jun 01 18:52:52 E2E used to behave much better, and it had a preview function Jun 01 18:53:00 but then they "improved" it :P Jun 01 18:53:24 that's how it goes :) Jun 01 18:54:34 "the signals going into the input pins of the CPU have the problem that they suffer from voltage drop and high current draw" ... that's called a drive conflict :P Jun 01 18:54:51 clearly those "input" pins are in fact configured as outputs Jun 01 18:56:10 hmm, hold on, lemme find the diagnostic utility for mcasp I once wrote Jun 01 18:56:11 but when I load my device tree file, all is fine. It's not until I load the driver and call register_card, that it does this Jun 01 18:56:26 why would that be strange? Jun 01 18:56:32 mcasp has full control over pin direction Jun 01 18:56:52 zmatt: oh wait, I'm confusing mux/control mode with direction Jun 01 18:56:54 literally *all* mcasp pins can be configured as input or output Jun 01 18:57:07 mux mode only selects pin function Jun 01 18:57:42 So, there should be some device tree attribute that I can set so that the davinci driver knows to set them as input? Jun 01 18:58:18 getting that stuff correctly configured is hell Jun 01 18:58:50 I looked at the device tree binding documentation file in the kernel, but that is very uninformative (to me) Jun 01 18:58:51 alsa -.- Jun 01 18:59:05 yes it is, and probably wrong too Jun 01 19:00:05 I mimicked the code of the ctag-face, BTW, which uses the exact same pins for input. Jun 01 19:00:14 halfgaar: look for pinctrl-* Jun 01 19:00:15 ctag-face ? Jun 01 19:00:26 mag: this isn't about pinmux Jun 01 19:00:38 okay Jun 01 19:00:40 * mag reads back Jun 01 19:01:10 halfgaar: I've also had issues where if I declared clocks the wrong way in DT, alsa suddenly decided it was going to output one instead of receiving one Jun 01 19:01:13 stuff like that Jun 01 19:01:44 ctag-face: https://hackaday.io/project/9634-beaglebone-multi-channel-audio-card-ctag-face24 Jun 01 19:01:52 driver is in beaglebone-linux Jun 01 19:02:52 well, at least I know where to look, but I don't understand it yet :) Jun 01 19:03:02 halfgaar: it's been a while already though since I last dealt with mcasp Jun 01 19:03:13 I ultimately resorted to kernel patches iirc Jun 01 19:03:28 zmatt: would you also know something about asynchronous driving of input/output? Jun 01 19:05:59 one sec Jun 01 19:08:56 halfgaar: at least I found my diagnostic util: https://liktaanjeneus.nl/asp-monitor.tar.xz Jun 01 19:09:17 let me also check what exactly it means, hehe Jun 01 19:09:53 Interesting domain name Jun 01 19:09:59 lang verhaal Jun 01 19:10:01 hehe Jun 01 19:10:26 when I run it, it says 'disabled' Jun 01 19:10:35 that means mcasp0 is disabled Jun 01 19:10:48 which is the case whenver there's no audio stream running Jun 01 19:10:50 annoyingly Jun 01 19:10:59 or, well, you can force it enabled I think Jun 01 19:11:05 I'm playing an mp3 and I get fancy colors Jun 01 19:11:16 it all means things ;) Jun 01 19:11:57 it says hclk is 24000000, but that can't be. It's a hardware oscillater at 24576000 Hz Jun 01 19:13:00 what does it show exactly? (the text part about the clocks) Jun 01 19:13:45 https://pastebin.com/cF1f9TXm Jun 01 19:14:16 I need TDM on the output, but not the input. Does the fact that the TX says 8 slots/frame, and RX doesn't, mean that's good? Jun 01 19:15:19 btw, at the top, the symbols below xHCF and rHCF show what the transmit and receive hclk/clk/fs are doing Jun 01 19:16:06 arrow up/down means it's toggling, green if output, yellow if input Jun 01 19:16:51 if the line is steady then it'll show either _ for low or ¯ for high, red if output and blue if input Jun 01 19:17:24 so there you can check if pins are inappropriately being configured as outputs Jun 01 19:17:47 ok, lemme see what it says about the clocks Jun 01 19:18:19 heh, that indeed looks like garbage Jun 01 19:18:22 d0123 are the axr pins? I see __↕_ in blue Jun 01 19:18:33 blue underscores Jun 01 19:19:33 hang on, making screenshot Jun 01 19:19:35 blue underscores means pins are low and not being driven Jun 01 19:20:24 well, half driven. My scope says the drive voltage is 1.1V Jun 01 19:20:36 blue = steady input, yellow ↕ = toggling input, red = steady output, green ↕ = toggling output Jun 01 19:21:00 blue means the bbb should not be driving the pin Jun 01 19:21:24 http://files.halfgaar.net/mcasp.png Jun 01 19:22:50 So the axr lines are input? I see the toggling one flip to red just before it goes disabled, so that seems to be correct output Jun 01 19:23:19 yeah, so it's configured to be full clock master: it uses internal clocks for everything, and has the following pins configured as outputs: { tx hclk, tx clk, tx fs, rx clk, rx fs, d2 } Jun 01 19:23:41 d0, d1, d3 are inputs (or disabled) Jun 01 19:26:53 Hmm. In soc-dai.h in the kernel there are clocking modes: Jun 01 19:26:55 https://github.com/beagleboard/linux/blob/1e63edb14e49a4360ba05cd12fc6b0e53c66a955/include/sound/soc-dai.h#L76 Jun 01 19:27:52 like I said, getting mcasp to setup clocks right can be fiddly Jun 01 19:28:46 I set the DAI link to SND_SOC_DAIFMT_CBM_CFM (codec clk & FRM master). THe annoying bit is that I have two codecs. Or, one DAC and one receiver. So having one mode doesn't work for me Jun 01 19:29:17 ah, I see I did interesting things to get input working... Jun 01 19:31:04 correction, copied wrong. I have SND_SOC_DAIFMT_CBS_CFS /* codec clk & FRM slave */ Jun 01 19:31:13 I guess that does it Jun 01 19:32:10 while the DIR is of course clock master Jun 01 19:32:30 and frame master Jun 01 19:33:12 but yeah I have it configured like that as well: the side transmitting the data is also responsible to bundle the timing signals along with it Jun 01 19:33:13 The whole driver code keeps referring to 'the codec': https://github.com/beagleboard/linux/blob/b752b5766316a01118b5efeeba31a3e307f86edf/sound/soc/davinci/davinci-mcasp.c#L452 Jun 01 19:33:25 I think I'm going to have to connect my DIR to the second mcasp port Jun 01 19:33:42 yeah with clock master I mean clock/frame master... in theory they can disagree but I don't think I've ever seen anyone do that Jun 01 19:34:49 using asp1 for receive may indeed be simpler... clearly having async rx and tx on mcasp0 can work since we have it working, but I'm now starting to remember more and more of what I had to do to make it happen... heh... Jun 01 19:35:22 I think the davinci-mcasp needs to be patched to make this work, to set other register bits Jun 01 19:35:45 the datasheet of the AM335X is quite clear what you need to do Jun 01 19:36:40 https://github.com/dutchanddutch/bb-kernel/tree/am33x-v4.9/patches/drivers/sound Jun 01 19:36:44 https://github.com/dutchanddutch/bb-kernel/tree/am33x-v4.9/patches/drivers/ti/mcasp Jun 01 19:36:48 I did a few patches ;) Jun 01 19:37:38 well, I think I can hack my soundcard-to-beagle bridge PCB to wire to another port, but ultimately, I'm going to have to make a new PCB Jun 01 19:38:03 I could patch, but I wanted to make this thing easy to use or improve for others Jun 01 19:38:13 BTW, what did you make? Jun 01 19:40:17 I needed two fairly unrelated things from mcasp actually... one was getting it working in DIT mode (stick an rs485 driver onto the BBB and you got a makeshift AES3 output) Jun 01 19:41:39 the other was getting a multichannel audio link (in both directions) working between BBB and a DSP Jun 01 19:43:03 what are you working on? Jun 01 19:44:00 I'm into DIY audio, and have always been annoyed by the lack of digital decoding capability. So, I'm making something that can take optical audio in, encoded in AC3, DTS, etc, use ffmpeg to decode it and output it as analog outputs Jun 01 19:44:46 nice :) Jun 01 19:44:48 my output works already. The TDM seems to clock correctly, as I can see on my scope, but I haven't tested all channels yet (though I do see the slots on the scope when I run speaker-test) Jun 01 19:45:22 btw I don't know if it's of any use, but here's the dtsi I have for multichannel rx (slave) + tx (master) ==> https://gist.github.com/mvduin/310d7c9ca7001dc3b3e0f7787622d39d Jun 01 19:45:41 don't mind the mess ;P Jun 01 19:46:26 I know that I had come to the conclusion that to properly use independent rx and tx I need to split the McASP into two subdevices or something... I don't remember quite the details Jun 01 19:47:15 that's clearly not what I've done XD Jun 01 19:47:24 using port 1 doesn't do it for you? I see you use 4 data lines, and port 1 only has 1 usuable (one can't be used if you need master clock) Jun 01 19:47:46 4 data lines? no? Jun 01 19:47:51 one data line per direction Jun 01 19:49:11 what these four lines: https://gist.github.com/mvduin/310d7c9ca7001dc3b3e0f7787622d39d#file-audio-dtsi-L117 Jun 01 19:49:53 but iirc by the time I discovered that the linux mcasp driver was kinda crappy it was too late to change the pin assignment... or maybe the asp1 pins were already in use for other purposes Jun 01 19:51:20 I had previously used mcasp from baremetal code on some other TI SoC, so I knew there's no problem using the rx and tx sections independently Jun 01 19:53:11 halfgaar: what about them? it's just one of several examples I give in that large block of comments Jun 01 19:53:27 Bare metal is easier in a way. Just write to registers and specified by the datasheet, instead of having to learn alsa... Jun 01 19:53:40 yes Jun 01 19:53:52 I mean, mcasp can be a bit finicky and eccentric Jun 01 19:53:52 zmatt: I guess I skimmed too fast. I thought that explained what you did Jun 01 19:54:03 but alsa is plain inscrutible Jun 01 19:54:15 I've tried to dig through it Jun 01 19:54:40 but seriously, the Direct Rendering Manager was easier to understand Jun 01 19:55:00 wow. That makes me feel a bit better for not getting it :) Jun 01 19:57:12 anyway, like I said, I think that *proper* support for async rx/tx will require mcasp to split into two DAIs or something.... Jun 01 19:57:25 that was too much hassle though, so I went for https://gist.github.com/mvduin/310d7c9ca7001dc3b3e0f7787622d39d#file-audio-dtsi-L157-L158 Jun 01 19:58:05 that property isn't part of the normal mcasp driver, I patched it in Jun 01 19:59:14 I think alsa-soc is to blame, because it assumes one link to one codec Jun 01 20:00:13 multi-party links are yet another story, but fortunately not one I have to deal with Jun 01 20:00:38 but I think mcasp could perfectly well have multiple DAIs Jun 01 20:01:53 Anyway, I have to go. Thanks for the chat, it helped me along a great deal Jun 01 20:02:08 good luck with your project :) Jun 01 20:02:13 thanks :) Jun 01 20:48:13 zmatt: is https://github.com/RobertCNelson/bb-kernel script also builds the uboot? Jun 01 20:57:43 no, why would it? Jun 01 20:58:08 u-boot is a completely separate thing and often never updated Jun 01 23:52:38 evening y'all Jun 01 23:52:51 zmatt Jun 02 00:00:07 yo Jun 02 00:32:23 BBB! Jun 02 00:32:57 This may sound odd and it is odd but here goes... Jun 02 00:32:58 zmatt: there is active development on uboot however .. Jun 02 00:33:06 Oops...sorry. Jun 02 00:33:11 but its less frequently updated :) Jun 02 00:33:25 Set_: greetings Jun 02 00:33:29 Hello. Jun 02 00:34:00 Should I be scared to use my BBB for a Python/Flask/HTML application that controls a motor? Jun 02 00:34:17 sounds like a decent enough application to me. Jun 02 00:34:34 Okay. I am buggin' out man. I know I could fail and fail hard. Jun 02 00:34:38 Set_: you've seen the Beaglebone-blue with the servo modules, right?! Jun 02 00:34:46 Yep! Jun 02 00:35:08 ver|laptop: I know, but I still suspect most people never update their bootloader, except as side-effect of reflashing Jun 02 00:35:15 zmatt: yup ;) Jun 02 00:35:27 that's what I meant with "often never updated" Jun 02 00:35:31 Set_: what are you worried about specifically? Jun 02 00:35:42 I have been building to deployment of this electro-mech mower. Jun 02 00:35:58 If I make the wrong thing happen, I might flip. Jun 02 00:36:14 Set_: you could say the same about much of life .. :p Jun 02 00:36:38 Common sense says that I can do it. I just am used to goofing up. Jun 02 00:36:47 BBB! Jun 02 00:37:47 I mean...I have this normally open sensor. I can use all those software things to make it e-mail me, apply a webpage to post it to me, and I think I can get the motor to do the same, e.g. "Your motor is turning right now." Jun 02 00:38:07 ... Jun 02 00:38:24 I have been working on it for years. Some people can do this without hesitation. Jun 02 00:38:35 everyone has to start somewhere .. Jun 02 00:38:53 The first time is always the first time. Jun 02 00:38:58 right Jun 02 00:39:07 Okay...I got enough jabber out. Jun 02 00:39:23 the sucky bit is .. to learn, you often have to make mistakes :) Jun 02 00:39:52 I know...I have been using a different sensor and not a motor. Jun 02 00:40:15 I want to use the motor but I am still thinking theory proves itself right again. Jun 02 00:40:57 Two leads and that is all. It should work the same way. Jun 02 00:41:37 basically. You need some form of motor driver though, but hopefully you've got that bit sussed Jun 02 00:41:55 I gotta brb .. must cook Jun 02 00:43:14 I was going to use a, hmm, damn. I knew something could not be so simple. Jun 02 00:43:16 Sheesh. Jun 02 00:43:48 What if I used the motor with a gear? Would I still need the motor driver? Jun 02 00:51:39 Set_: you can't generate the current needed for a motor, just from the BBB io pins :/ Jun 02 00:52:26 I know... Jun 02 00:52:32 I was using a Cape. Jun 02 00:52:38 Oh...I get it now. Jun 02 00:52:50 Sorry...I have two projects mixed up. Jun 02 00:53:45 Pro. 1: Electro-Mech Mower; Pro. 2: Webpage Motor Namer Jun 02 00:54:17 So...the first pro. is done. Jun 02 00:55:08 The second pro. w/ the BBB needs work. I think I can use a battery (separate) from powering on the BBB but I have not configured it yet. Jun 02 00:55:47 ... Jun 02 00:57:20 I can power on the BBB with a powerbank while I use a battery for the motor(s) but the motors will not have drivers. The motors are going to be, aw! Jun 02 00:57:47 I need a driver or H-Bridge for the motors to control direction. Jun 02 00:58:19 ... Jun 02 00:59:45 Hey...is there a way to control the direction of the motor without a driver or H-Bridge, i.e. an online application? Jun 02 01:00:23 use a continous rotation servo Jun 02 01:01:16 For instance, using the Flask application in a way that controls what happens to the hardware when I apply an extra page to my application...heh? Jun 02 01:02:13 Example: Page dog.com/love starts my motors and dog.com/love/heart makes my motors go forward. Jun 02 01:04:21 I have tried this idea with a given set of instructions from the Motor Bridge Cape and with motors but not from scratch. Jun 02 01:05:54 I think I just read more than test. I just want to make sure I know 71% of what happens and why. Learn-a-did! Jun 02 01:49:45 What happens when I call cat $SLOTS on my BBB? Jun 02 01:54:36 what's $SLOTS ? Jun 02 01:55:40 I think it is the place that shows the BBB's slots. Jun 02 01:56:18 for virtual capes. Jun 02 01:57:14 I found only one slot on my BBB. Jun 02 01:57:39 I was going to use slot to make some overlays or take away some. Jun 02 01:58:34 along the way... Jun 02 01:59:09 did slots become extinct or is there another section where slots is located? Jun 02 02:06:10 I tried it. Nothing happens on my end. On to other items... Jun 02 02:32:09 Hello out there. I've been stuck trying to get my debian computer to talk to my beaglebone. It does not work. I can ssh into the bbb from a windows machine running gitBASH just fine so it isn't the cable of the bbb. I can't see a usb0 device on my network but I can see the stoarge under sdb1 from the usb cable. Jun 02 02:33:37 open cmd prompt... Jun 02 02:34:10 then... Jun 02 02:34:16 I have a terminal open, running debian on the new 4.9 kernel Jun 02 02:34:21 ssh@ Jun 02 02:34:24 192 Jun 02 02:34:29 .168.7.2 Jun 02 02:35:38 Thank you, that won't work on this machine. Jun 02 02:35:46 Nooooooooo! Jun 02 02:35:51 lol Jun 02 02:35:54 Sorry. Jun 02 02:36:02 NP's Jun 02 02:36:33 So, you cannot get to ssh your bbb on Linux? Jun 02 02:36:53 No. I can't even see a usb0 device on my network. Jun 02 02:37:20 I have to ask...what happens when you ssh@? Jun 02 02:37:44 It hangs for at least 10 minutes. Jun 02 02:38:01 Okay... Jun 02 02:38:04 Hmm. Jun 02 02:39:49 Hold on...Let me think. Jun 02 02:39:56 Try ifconfig -a Jun 02 02:40:32 enx6ceceb925dfa: flags=4098 Jun 02 02:40:47 Has this jumble of stuff now instead of the reagular eth0, l0, wlan0 Jun 02 02:40:58 Okay...please hold. Jun 02 02:41:12 Oh and austin. I am not a smart cracker around here. Jun 02 02:41:17 Ask anyone. Jun 02 02:41:33 lol np's thanks for your help anyways I'm kind of out of ideas. Jun 02 02:41:48 When it showed that wlan0, write down you address. Jun 02 02:41:57 Do not say it in here. Jun 02 02:42:12 Type that address after ssh@ Jun 02 02:43:39 it logs me into my machine again Jun 02 02:44:27 Okay...so? You are using a Linux computer to make aware of the BBB? Jun 02 02:44:55 Oh that site, bbb.io, they have something on the BBB and Linux. Please hold. I am off to look it up. Jun 02 02:44:57 I am using a linux computer and I want to use it to ssh into the bbb. Jun 02 02:45:37 USB and BBB w/ Linux = ssh@192.168.7.2 Jun 02 02:45:39 I thought. Jun 02 02:45:57 Let me read something else. Jun 02 02:46:25 I think it's 192.168.6.2 for mac/linux but I've tried both addresses to no avail Jun 02 02:47:13 Hey...did you ever go to http://192.168.7.2 yet without ssh? Jun 02 02:47:51 Yes Jun 02 02:48:05 It says the site can't be reached Jun 02 02:48:29 Let me check on this. That sounds odd! Jun 02 02:48:54 Please hold. Oh and man, this Cust. Serv. thing is not all it is cracked out to be... Jun 02 02:49:08 Haha I feel you. Jun 02 02:51:09 Chrome? Jun 02 02:51:37 chromium Jun 02 02:51:58 You may need a couple of things done. Jun 02 02:52:08 Ok. Jun 02 02:52:09 I cannot ssh into my machine now either. Jun 02 02:52:32 That's not good. Jun 02 02:52:50 Heh...try Cloud9. Jun 02 02:53:12 192.168.7.2:3000 Jun 02 02:53:35 What is cloud9? Jun 02 02:53:50 An IDE for the BBB. Jun 02 02:54:02 It is built right in. Jun 02 02:54:26 I don't have it. Jun 02 02:54:33 Damn! Jun 02 02:54:36 lol Jun 02 02:54:42 debian doesn't have it in packages either Jun 02 02:54:47 Oh? Jun 02 02:55:41 I thought the main thriller of BBB.io came w/ c9.io attached. Jun 02 02:56:00 I have no access to the bbb unfortunately. Jun 02 02:56:20 Oh...do you have the BBB or BBBW? Jun 02 02:56:26 BBB Jun 02 02:56:48 Okay. Try root@beaglebone.local Jun 02 02:57:30 where do I put that? Jun 02 02:57:35 I meant this last time...sorry. Try root@192.168.7.2 for USB. Jun 02 02:57:41 cmd line Jun 02 02:59:43 Sorry man...I am trying to remember how I used the BBB with Linux on my HyperVisor. **** ENDING LOGGING AT Fri Jun 02 03:00:01 2017