From: Takashi Iwai Subject: Re: [PATCH] Show processing coefficients in codec proc file Date: Fri, 20 Aug 2010 18:03:45 +0200 Message-ID: References: <4C6D7546.4000506@canonical.com> <4C6D7C98.5030207@canonical.com> <4C6E9541.6000402@canonical.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id BCAF72454E for ; Fri, 20 Aug 2010 18:03:47 +0200 (CEST) In-Reply-To: <4C6E9541.6000402@canonical.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: David Henningsson Cc: "alsa-devel@alsa-project.org" List-Id: alsa-devel@alsa-project.org At Fri, 20 Aug 2010 16:46:25 +0200, David Henningsson wrote: > > 2010-08-19 22:24, Takashi Iwai skrev: > > At Thu, 19 Aug 2010 20:48:56 +0200, > > David Henningsson wrote: > >> > >> 2010-08-19 20:28, Takashi Iwai skrev: > >>> At Thu, 19 Aug 2010 20:17:42 +0200, > >>> David Henningsson wrote: > >>>> > >>>> This patch is helpful for tracking down bugs without having all > >>>> information about the chip. > >>> > >>> I don't want to change coef index in reading a proc file in general. > >> > >> Good point. But I think the solution to that problem would be to > >> - read current index > >> - do the loop > >> - restore current index > >> > >> ...and perhaps protect that with an appropriate mutex (which one)? > >> > >>> If any, you should implement a codec-specific hook. > >> > >> I'm sorry, but I don't really see how that would help...? > > > > If it's specific to a codec, then you know whether reading the coef > > in that way can be harmful or not. It's not only about the race > > via proc file but also the influence of coef on the actual codec > > behavior. > > Oh, so there are chips that are *that* broken... > > Yet it could be a lifesaver so I wouldn't want to give up on the idea > just yet... As mentioned, I don't mind to add it but as a beginning, let's add it conditionally for known-working codecs. Eventually we can put it to the generic part, with a blacklisting if needed. > Do you know off the top of your head approximately what codec chips this > is about, where reading a coef (or setting its index) can cause unwanted > side-effects? I don't remember exactly which one. I thought either an old Realtek or AD codec. Takashi