From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 850D9C48BE0 for ; Fri, 11 Jun 2021 09:56:28 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3ED99613F3 for ; Fri, 11 Jun 2021 09:56:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3ED99613F3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 238D0186B; Fri, 11 Jun 2021 11:55:35 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 238D0186B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1623405385; bh=3wG/TCQZ3O54F6NXItDwStkCj4fcCJIrjjz0TqVpLpY=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=SGcnZ1WPPfRxCv6Ki8DIHVlb1da+5zIyCS54yNTjZUJ4fz350xhk5Y3HGDVImaj0Q dF523MmNKU3R3TFMyGArQ25l1XfQXZPgkRR6HKIxzIlcOv4KyaY+X0xXJCZpTQj0O6 7pFmkHT+7IAuZLocT0DL+zJSes5ggRuwlPAHjkaE= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id B2CFFF80149; Fri, 11 Jun 2021 11:55:34 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1E5A1F80149; Fri, 11 Jun 2021 11:55:33 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id DEB52F80149 for ; Fri, 11 Jun 2021 11:55:24 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz DEB52F80149 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="ehhH3ksO"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="spGexavE" Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 3EBB321987; Fri, 11 Jun 2021 09:55:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1623405323; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=VWlAXvt7ukm5oVPggCsdY4FUG1gcQcyeBBwOyXCsnkU=; b=ehhH3ksOHJ6jBK3pFCfkD8fqdfkSwaz6DHQcdpZTifgXfkINF+PBENIisI98nPvAQAxgqd UkGPQZlcZtDDTuw2B7No3nKk9jjvRTUKj3Q/XTnjVbOkw+TFSkPEcHCt9UhXEdCtMzZzxU ztNh93plDA80SfHzhetDxLrjKe0ZgtU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1623405323; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=VWlAXvt7ukm5oVPggCsdY4FUG1gcQcyeBBwOyXCsnkU=; b=spGexavE9X9LDmSSjUcIaA02qGLPU2QkWXUEmwQOD0eVeY6X8andvIdYwNGaZF+KJppU2J jTzTPLX9PjiIoXCw== Received: from alsa1.suse.de (alsa1.suse.de [10.160.4.42]) by relay2.suse.de (Postfix) with ESMTP id 2F8EFA3B9F; Fri, 11 Jun 2021 09:55:23 +0000 (UTC) Date: Fri, 11 Jun 2021 11:55:23 +0200 Message-ID: From: Takashi Iwai To: Muni Sekhar Subject: Re: SNDRV_PCM_IOCTL_READI_FRAMES returns EIO In-Reply-To: References: 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/25.3 (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 Cc: alsa-devel X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Fri, 11 Jun 2021 10:43:01 +0200, Muni Sekhar wrote: > > On Fri, Jun 11, 2021 at 1:19 PM Takashi Iwai wrote: > > > > On Fri, 11 Jun 2021 09:02:44 +0200, > > Muni Sekhar wrote: > > > > > > Hi all, > > > > > > I am using a USB sound card(snd-usb-audio), and it fails while doing > > > the audio recording "arecord: pcm_read:2032: read error: Input/output > > > error". > > > > > > I noticed recording(arecord) audio data on a USB sound card fails at > > > SNDRV_PCM_IOCTL_READI_FRAMES is giving EIO. > > > > > > Can someone please clarify when the kernel returns EIO for Ioctl > > > SNDRV_PCM_IOCTL_READI_FRAMES? and is there a workaround for this? > > > > It's a problem of either your device (e.g. USB device firmware) or the > > kernel. Do you get any relevant kernel error messages? > dmesg log does not indicate any such error messages when arecord fails. Then it's likely a debug print in PCM core, which is suppressed as default. You can enable it via dyndbg stuff. It won't help much for diagnose at this stage, though. > Is there a way to prove it as a USB device firmware issue or kernel issue? You can check strace output, for example. The PCM core is supposed to be bug-free regarding this, so it's about USB-audio driver, and the problem is specific to your device (other USB-audio devices work), hence it's very likely a firmware problem. > Please find the alsamixer output in the attached file alsamixer_output.png file. The mixer output has nothing to do with the PCM problem. Takashi