2013-07-13 00:19 rz2k has quit [] 2013-07-13 00:43 FDCX has joined #qi-hardware 2013-07-13 00:47 FDCX has quit [Remote host closed the connection] 2013-07-13 00:47 FDCX has joined #qi-hardware 2013-07-13 00:48 FDCX has quit [Remote host closed the connection] 2013-07-13 00:49 FDCX has joined #qi-hardware 2013-07-13 01:17 _ffio_ has joined #qi-hardware 2013-07-13 01:19 ffio_ has quit [Ping timeout: 260 seconds] 2013-07-13 03:14 khelair has joined #qi-hardware 2013-07-13 04:08 kristianpaul has quit [Ping timeout: 256 seconds] 2013-07-13 04:12 arossdotme has quit [Ping timeout: 264 seconds] 2013-07-13 04:13 kristianpaul has joined #qi-hardware 2013-07-13 04:13 kristianpaul has joined #qi-hardware 2013-07-13 04:28 xiangfu has joined #qi-hardware 2013-07-13 05:45 _ffio_ has quit [Ping timeout: 240 seconds] 2013-07-13 06:01 _ffio_ has joined #qi-hardware 2013-07-13 06:17 khelair has quit [Ping timeout: 240 seconds] 2013-07-13 06:17 viric has quit [Ping timeout: 240 seconds] 2013-07-13 06:22 viric has joined #qi-hardware 2013-07-13 06:31 khelair has joined #qi-hardware 2013-07-13 06:36 wej has quit [Ping timeout: 260 seconds] 2013-07-13 07:33 wej has joined #qi-hardware 2013-07-13 07:44 kuribas has joined #qi-hardware 2013-07-13 08:25 lekernel has joined #qi-hardware 2013-07-13 09:04 kilae has joined #qi-hardware 2013-07-13 09:13 kuribas has quit [Ping timeout: 240 seconds] 2013-07-13 09:44 arossdotme has joined #qi-hardware 2013-07-13 09:47 khelair has quit [Remote host closed the connection] 2013-07-13 09:47 lekernel has quit [Ping timeout: 240 seconds] 2013-07-13 09:48 khelair has joined #qi-hardware 2013-07-13 10:01 lekernel has joined #qi-hardware 2013-07-13 10:29 arossdotme has quit [Quit: arossdotme] 2013-07-13 11:03 rz2k has joined #qi-hardware 2013-07-13 11:09 khelair has quit [Remote host closed the connection] 2013-07-13 12:03 unclouded has quit [Ping timeout: 264 seconds] 2013-07-13 12:33 porchao has joined #qi-hardware 2013-07-13 12:38 kuribas has joined #qi-hardware 2013-07-13 13:35 xiangfu has quit [Ping timeout: 264 seconds] 2013-07-13 13:37 xiangfu has joined #qi-hardware 2013-07-13 14:01 ffio has joined #qi-hardware 2013-07-13 14:02 _ffio_ has quit [Ping timeout: 258 seconds] 2013-07-13 14:50 xiangfu has quit [Quit: leaving] 2013-07-13 16:31 lekernel has quit [Quit: Leaving] 2013-07-13 16:46 larsc: on the JZ4770, if I power down the DAC, user space gets blocked when playing samples 2013-07-13 16:47 as in, the application is stuck in place until I enable one of the outputs that thereby indirectly enable the DAC 2013-07-13 16:47 so the whole DMA is disabled? 2013-07-13 16:47 my guess is that the fifos don't get read anymore and therefore don't issue interrupts anymore either 2013-07-13 16:48 If the codec is the clock master 2013-07-13 16:48 and the clocks are disabled 2013-07-13 16:48 as well 2013-07-13 16:48 the i2s core won't request any new samples anymore 2013-07-13 16:48 I was wondering if this is a bug in the pcm or i2s driver or whether I simply shouldn't power down the DAC 2013-07-13 16:49 originally the codec driver didn't power down the DAC, but I've been cleaning it up and then this problem suddenly appeared 2013-07-13 16:49 the codec driver enables the clock at codec probe and never disables it 2013-07-13 16:49 it probably shuts down more than just the DAC 2013-07-13 16:50 not ALSA, in any case: if I add a single line that only resets the DAC standby bit, the problem disappears 2013-07-13 16:50 maybe in the hardware there is also some kind of dependency graph? 2013-07-13 16:50 although the docs say they leave all that to software 2013-07-13 16:51 yea, I'd assume that the codec shutsdown it's I2S clock if the DAC is powered down 2013-07-13 16:51 or well the bit controls more than just the DAC 2013-07-13 16:52 so the I2S clock is sent by the codec to the AIC? 2013-07-13 16:53 That's what I'd suspect 2013-07-13 16:54 It's not unheard of that a codec tries to be smart and shutsdown the clocks if there is no active path over which audio could be played 2013-07-13 16:54 viric has quit [Ping timeout: 240 seconds] 2013-07-13 16:57 the AIC is configurd to output SYSCLK, is that the same clock used for I2S or a different clock? 2013-07-13 16:57 a different one, most likely 2013-07-13 16:57 sysclk is usually the master clock 2013-07-13 16:57 used by the codec to generate all other clocks 2013-07-13 16:58 "When use with the internal CODEC, the BIT_CLK and SYNC signals also with O_BIT_CLK and O_SYNC signals are provided by the internal CODEC from the SYSCLK, which is enabled by I2SCR.ESCLK and configured to 12MHz clock using CPM." 2013-07-13 16:58 so it seems there is a kind of loopback that derives the I2S clock from SYSCLK 2013-07-13 16:58 and perhaps powering down the DAC shuts down that loopback 2013-07-13 17:00 viric has joined #qi-hardware 2013-07-13 17:01 I wouldn't call it a loopback, but yes that's what is most likely happening 2013-07-13 17:03 yeah, it's more complex than just a wire, but the signal eventually gets sent back to the component where it came from 2013-07-13 17:04 well it's comming from the cpm 2013-07-13 17:24 the AIC has a bit that controls whether it exports the SYSCLK or not 2013-07-13 17:24 so it's not coming directly from the CPM, but via the AIC 2013-07-13 17:25 anyway, do you have an idea on how to fix this? 2013-07-13 17:26 there doesn't seem to be a way to implicitly control the I2S clock 2013-07-13 17:26 keep the DAC powered 2013-07-13 17:26 so one option would be to have the DAC enabled while playing with no outputs 2013-07-13 17:26 but it would waste some power 2013-07-13 17:26 how often do you think somebody plays audio with all outputs disabled? 2013-07-13 17:27 I mean it's not really a valid usecsae 2013-07-13 17:27 I do it quite often, if I'm playing games in the train 2013-07-13 17:27 I don't want to bother other people with the sound effects 2013-07-13 17:27 and often I'd rather disable sound than plug in headphones 2013-07-13 17:28 But it would be better if the application would allow you disable sound altogether 2013-07-13 17:28 some do, but not every application has that option 2013-07-13 17:29 Maybe you can somehow redirect audio to the null plugin 2013-07-13 17:29 You do have a centeral deamon that handles stuff like volume right? 2013-07-13 17:29 I guess it's not trivial to have the samples consumed at the right rate if the dma is not running 2013-07-13 17:29 we have pwswd, which handles global hotkeys 2013-07-13 17:30 but it's not guaranteed that all volume changes go through that 2013-07-13 17:30 but if you change the alsa config to use the null plugin is audio is off you'd save even more power 2013-07-13 17:31 if audio is off 2013-07-13 17:32 although I'm not sure how well that would work with already active streams 2013-07-13 17:33 maybe I'm over-optimizing and should just leave the DAC powered 2013-07-13 17:33 leave it powered :) 2013-07-13 17:33 it took me several days to get the microphone support correct... 2013-07-13 17:33 although that was mostly because I'm not very good with ALSA yet 2013-07-13 17:33 and there is very little documentation on ALSA 2013-07-13 17:34 I am quite happy with how it turned out in the end though 2013-07-13 17:34 the platform data can now specify whether you have 0, 1 or 2 mono mics, or two mic inptus combined into one stereo mic 2013-07-13 17:35 and the right controls are instantiated for every case 2013-07-13 17:35 while previously you'd see all controls, even for inputs that don't exist on your board 2013-07-13 17:41 sounds about right 2013-07-13 18:25 Ornotermes has joined #qi-hardware 2013-07-13 18:32 kuribas has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 2013-07-13 18:32 kuribas has joined #qi-hardware 2013-07-13 18:52 larsc: this is what I came up with for the DAC power problem: http://www.treewalker.org/temp/force-sysclk.diff 2013-07-13 18:56 have you checked whether there is a similar problem for capture? 2013-07-13 18:56 no, I haven't tested capture at all yet 2013-07-13 19:37 arossdotme has joined #qi-hardware 2013-07-13 21:44 kilae has quit [Quit: ChatZilla 0.9.90 [Firefox 22.0/20130618035212]] 2013-07-13 22:01 ffio_ has joined #qi-hardware 2013-07-13 22:02 ffio has quit [Ping timeout: 260 seconds] 2013-07-13 22:26 kuribas has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 2013-07-13 22:42 unclouded has joined #qi-hardware 2013-07-13 23:03 arossdotme has quit [Ping timeout: 260 seconds] 2013-07-13 23:04 arossdotme has joined #qi-hardware 2013-07-13 23:04 wej has quit [Ping timeout: 260 seconds] 2013-07-13 23:06 wej has joined #qi-hardware 2013-07-13 23:14 rz2k has quit [] 2013-07-13 23:27 uwe_mobile__ has quit [Ping timeout: 264 seconds] 2013-07-13 23:53 uwe_mobile has joined #qi-hardware