From: Takashi Iwai Subject: Re: Re: au88x0_mpu401 init / fail first open Date: Thu, 11 May 2006 16:09:56 +0200 Message-ID: References: <200605051139.34432.gineera@aspect135.co.uk> <200605101653.21574.gineera@aspect135.co.uk> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: <200605101653.21574.gineera@aspect135.co.uk> Sender: alsa-devel-admin@lists.sourceforge.net Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Alan Horstmann Cc: Clemens Ladisch , alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org At Wed, 10 May 2006 16:53:21 +0100, Alan Horstmann wrote: > > On Friday 05 May 2006 11:39, I wrote: > > I've noticed that au88x0 has an error on the first use of the midi port > > only. With 1.0.11 midi play continues OK anyway; with the later 'fix-hang' > > patch it results in failled I/O. > > > > Sprinkling with printks has enabled me to trace it. It seems that when the > > port is sent 'ENTER_UART' ACK (0xfe) can be read, but the following command > > does not result in ACK, even though on it's own it would. In its init, > > au88x0_mpu401 sends 'RESET' then 'ENTER_UART'. Subsequently, when playng > > midi, mpu401_uart attempts output_open and also sends 'RESET' and expects > > ACK -but 0xf9 is read instead. A second attempt to play is successful. > > During normal use, when the output is closed, 'RESET' is sent again, but > > not tested for ACK (which would fail) and the next output_open is > > sucessful. > > > > Any comments?? A hacked diff is attached which shows the affected bits of > > code, and additional writes and reads in au88x0_mpu401 which demonstrate > > the behaviour. Result is: Temp1 0xfe, Temp2 0xfe, Temp3 0xf9, Temp4 0xfe, > > Temp5 0xf9. > > > > To fix (though not necessarily the solution) either omit the 'ENTER_UART' > > in au88x0_mpu401, or add an extra 'RESET' afterwards. > > Perhaps I didn't explain it very well. Raymond has confirmed the behaviour. > I could not find any info on the mpu401 commands; do you have a better idea? > > It seems that the behaviour of ENTER_UART is the same with other cards. What > is different is that au88x0_mpu401 sends it during init, which for example > ice1712 doesn't. The extra ENTER_UART then fouls up the first output_open in > mpu401_uart. Removing it as per attached diff is successful. Is this a > reasonable thing to do? Actually, both RESET and ENTER_UART are issued at open in mpu401_uart.c, so they are basically unnecessary to be called here... Takashi ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642