From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752176Ab2IFGs2 (ORCPT ); Thu, 6 Sep 2012 02:48:28 -0400 Received: from cantor2.suse.de ([195.135.220.15]:35571 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750985Ab2IFGs1 (ORCPT ); Thu, 6 Sep 2012 02:48:27 -0400 Date: Thu, 06 Sep 2012 08:48:25 +0200 Message-ID: From: Takashi Iwai To: Daniel Mack Cc: Markus Trippelsdorf , Linus Torvalds , linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, Pierre-Louis Bossart Subject: Re: In-Reply-To: <504843BA.2040808@gmail.com> References: <20120906060220.GA252@x4> <504843BA.2040808@gmail.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/24.1 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org At Thu, 06 Sep 2012 08:33:30 +0200, Daniel Mack wrote: > > On 06.09.2012 08:02, Markus Trippelsdorf wrote: > > On 2012.09.04 at 16:40 +0200, Takashi Iwai wrote: > >> ---------------------------------------------------------------- > >> Sound fixes for 3.6-rc5 > >> > >> There are nothing scaring, contains only small fixes for HD-audio and > >> USB-audio: > >> - EPSS regression fix and GPIO fix for HD-audio IDT codecs > >> - A series of USB-audio regression fixes that are found since 3.5 kernel > >> > >> ---------------------------------------------------------------- > >> Daniel Mack (4): > >> ALSA: snd-usb: Fix URB cancellation at stream start > >> ALSA: snd-usb: restore delay information > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > The commit fbcfbf5f above causes the following lines to be printed > > whenever I start a new song: > > Copied Pierre-Louis Bossart - he wrote the code in 294c4fb8 which this > patch (fbcfbf5f) brings back now. > > > delay: estimated 0, actual 352 > > delay: estimated 353, actual 705 > > > > (44.1 * 8 = 352.8) > > > > This happens with an USB-DAC that identifies itself as "C-Media USB > > Headphone Set". > > And you didn't you see these lines with 3.4? Maybe the difference of start condition? Markus, does the patch below fix anything? Takashi --- diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c index fd5e982..0ff9f1a 100644 --- a/sound/usb/pcm.c +++ b/sound/usb/pcm.c @@ -556,7 +556,7 @@ static int snd_usb_pcm_prepare(struct snd_pcm_substream *substream) subs->hwptr_done = 0; subs->transfer_done = 0; subs->last_delay = 0; - subs->last_frame_number = 0; + subs->last_frame_number = snd_usb_pcm_delay(subs, runtime->rate); runtime->delay = 0; /* for playback, submit the URBs now; otherwise, the first hwptr_done From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: (no subject) Date: Thu, 06 Sep 2012 08:48:25 +0200 Message-ID: References: <20120906060220.GA252@x4> <504843BA.2040808@gmail.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 DF722265B63 for ; Thu, 6 Sep 2012 08:48:26 +0200 (CEST) In-Reply-To: <504843BA.2040808@gmail.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: Daniel Mack Cc: alsa-devel@alsa-project.org, Linus Torvalds , linux-kernel@vger.kernel.org, Markus Trippelsdorf , Pierre-Louis Bossart List-Id: alsa-devel@alsa-project.org At Thu, 06 Sep 2012 08:33:30 +0200, Daniel Mack wrote: > > On 06.09.2012 08:02, Markus Trippelsdorf wrote: > > On 2012.09.04 at 16:40 +0200, Takashi Iwai wrote: > >> ---------------------------------------------------------------- > >> Sound fixes for 3.6-rc5 > >> > >> There are nothing scaring, contains only small fixes for HD-audio and > >> USB-audio: > >> - EPSS regression fix and GPIO fix for HD-audio IDT codecs > >> - A series of USB-audio regression fixes that are found since 3.5 kernel > >> > >> ---------------------------------------------------------------- > >> Daniel Mack (4): > >> ALSA: snd-usb: Fix URB cancellation at stream start > >> ALSA: snd-usb: restore delay information > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > The commit fbcfbf5f above causes the following lines to be printed > > whenever I start a new song: > > Copied Pierre-Louis Bossart - he wrote the code in 294c4fb8 which this > patch (fbcfbf5f) brings back now. > > > delay: estimated 0, actual 352 > > delay: estimated 353, actual 705 > > > > (44.1 * 8 = 352.8) > > > > This happens with an USB-DAC that identifies itself as "C-Media USB > > Headphone Set". > > And you didn't you see these lines with 3.4? Maybe the difference of start condition? Markus, does the patch below fix anything? Takashi --- diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c index fd5e982..0ff9f1a 100644 --- a/sound/usb/pcm.c +++ b/sound/usb/pcm.c @@ -556,7 +556,7 @@ static int snd_usb_pcm_prepare(struct snd_pcm_substream *substream) subs->hwptr_done = 0; subs->transfer_done = 0; subs->last_delay = 0; - subs->last_frame_number = 0; + subs->last_frame_number = snd_usb_pcm_delay(subs, runtime->rate); runtime->delay = 0; /* for playback, submit the URBs now; otherwise, the first hwptr_done