From: Takashi Iwai Subject: Re: ESI Juli@ crash with external clock switch - patch Date: Mon, 12 Jan 2015 09:21:33 +0100 Message-ID: References: <54B28174.7060008@ivitera.com> <54B2B992.7000909@ivitera.com> <54B2E48B.7020000@ivitera.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 76D6C2604B4 for ; Mon, 12 Jan 2015 09:21:33 +0100 (CET) In-Reply-To: <54B2E48B.7020000@ivitera.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Pavel Hofman Cc: alsa-devel List-Id: alsa-devel@alsa-project.org At Sun, 11 Jan 2015 22:00:59 +0100, Pavel Hofman wrote: > > Dne 11.1.2015 v 21:36 Takashi Iwai napsal(a): > > > > OK, then this should be cancel_delayed_work_sync() instead, I suppose. > > The revised patch (also for ak4113.c) below. > > I am afraid it is getting stuck in the same way - see the thread stack > below. > > > > >> > >> I see, snd_ak4113_reinit of ak4113.c is never called, only > >> ak4113_init_regs. Perhaps Juli should not touch the workqueue in > >> ak4114_reinit and only initialize the regs in similar manner to ak4113? > > > > No, it's just quartet driver doesn't handle it properly :) > > Why is actually the restart of the workqueue needed at reinit? The work > (snd_ak4114_check_rate_and_errors) only reads ak4114 regs to controls > (using i2c routine synchronized with mutexes) and handles the stream stop. Yeah, restart is necessary only in a certain situation, and is a bug that is done through work itself. This was the cause. I'll prepare fix patches later. > > It doesn't matter much because PM doesn't work with Quartet. > > But the juli.c also should be improved regarding PM. It should stop > > the workq at suspend. Also, it'd be preferable to have some control > > start/stop this background work, e.g. via a control element. > > Otherwise your machine will be constantly loaded unnecessarily. > > I think we can extend the timer, perhaps to HZ/2 - the thread is just a > security measure anyway. The HZ/10 isn't that bad, but the problem is that it's unconditionally running even if user doesn't need/want. Takashi