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 8DF6AC48BE0 for ; Fri, 11 Jun 2021 10:33:21 +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 C0A94613E9 for ; Fri, 11 Jun 2021 10:33:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C0A94613E9 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 E0FB318B2; Fri, 11 Jun 2021 12:32:28 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E0FB318B2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1623407599; bh=MHJzyj2NsdVTXyKroDbgj2K7Kkt5PvzMIWIX6QRYBwk=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=PuG+K3g6L/TWVL0Kt9Mf82zVoPCqdhdhXpXadjU4ycYjPEx24BUF7AAIFAg/p9uOa IL8VPXFzMJYSw4mPHpFidHLMO6BAa7ZIWHtBC+ud5VhTC5PkazD7rcitfL0aH3hHlQ mHgbP5yEUmNvoMQihOgSWFUyNEBEqdfNCpEt7XlE= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 5DD70F80149; Fri, 11 Jun 2021 12:32:28 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id C5074F8026C; Fri, 11 Jun 2021 12:32:26 +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 938D3F800FB for ; Fri, 11 Jun 2021 12:32:18 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 938D3F800FB Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="IGW0RoWD"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="U1PPLKHH" Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 352B621999; Fri, 11 Jun 2021 10:32:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1623407537; 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=G6LW9BrU0PLwsb/uF5sdNDML46a0VUCmG2BMpae8h4Q=; b=IGW0RoWDZyxyYdU9NnXKgxusTrGNrQO2e8NPk5DSgMlJFH0VHIP2+/86Fd21H2+wnV2lgY xbfZ4Hk0BRFFTwBgg0wFxBIi++ajzMqRr2PsWMsiHaJ2h95w+IV/paUA9s3CqdTSlNZ3gR gHth0j3wpDBptd6+FJS9q+Yhnc9PTW4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1623407537; 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=G6LW9BrU0PLwsb/uF5sdNDML46a0VUCmG2BMpae8h4Q=; b=U1PPLKHHHOxRvMNK2ksxvHlLmGOVeIP1dSNI7JaQIJRUC1qMUZ9/szIAvGqRj6MjkrXsUQ PBgqiftLVD3ALTAg== Received: from alsa1.suse.de (alsa1.suse.de [10.160.4.42]) by relay2.suse.de (Postfix) with ESMTP id 2FD84A3B85; Fri, 11 Jun 2021 10:32:17 +0000 (UTC) Date: Fri, 11 Jun 2021 12:32:17 +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 12:24:40 +0200, Muni Sekhar wrote: > > On Fri, Jun 11, 2021 at 3:25 PM Takashi Iwai wrote: > > > > 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 it snd-pcm.ko ? In my system, this module gets loaded as mentioned below: > alsa-base.conf:15:install snd-pcm /sbin/modprobe --ignore-install > snd-pcm $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist > snd-pcm-oss ; : ; } The dynamic debug can be enabled at any time via sysfs. > > > 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 strace output in the attached file "strace_op.txt" > file. Does it gives any more information? Not really for fixing the problem itself :) Again, it's a problem in USB-audio driver, and that's likely a firmware problem. At best, contact with the hardware vendor. Takashi