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=-7.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 49213C432BE for ; Wed, 11 Aug 2021 12:46:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1494760F38 for ; Wed, 11 Aug 2021 12:46:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230004AbhHKMq4 (ORCPT ); Wed, 11 Aug 2021 08:46:56 -0400 Received: from mail1.perex.cz ([77.48.224.245]:59286 "EHLO mail1.perex.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229794AbhHKMqy (ORCPT ); Wed, 11 Aug 2021 08:46:54 -0400 Received: from mail1.perex.cz (localhost [127.0.0.1]) by smtp1.perex.cz (Perex's E-mail Delivery System) with ESMTP id 0C0D7A003F; Wed, 11 Aug 2021 14:46:27 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.perex.cz 0C0D7A003F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=perex.cz; s=default; t=1628685987; bh=QXZXgljJCtdu7MBw+Qb9Nfz9/Rx2MXlzqn/ktvGvLiQ=; h=Subject:To:References:From:Date:In-Reply-To:From; b=wjTLgYX6bmNoLoLnZf78Uz9yjiBaMYm7mn4usY8QEGYxtqfHZNaWk5xXcyX5XRgo0 dQTTdVOrsLxxg60JGtUjYKMUphIZfLCafF7id8r++9NC00OclJAFndtgkPj8AhsW61 Jz2D8EvntPO9Q/2upjFAufkBxFb31YCUi+mf3CDA= Received: from p1gen2.localdomain (unknown [192.168.100.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: perex) by mail1.perex.cz (Perex's E-mail Delivery System) with ESMTPSA; Wed, 11 Aug 2021 14:46:20 +0200 (CEST) Subject: Re: USB-Audio: Device or resource busy (strace log) To: Muni Sekhar , alsa-devel , linux-usb@vger.kernel.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, kernelnewbies References: From: Jaroslav Kysela Message-ID: <41bebccc-7940-8379-0108-047bd1cc92f9@perex.cz> Date: Wed, 11 Aug 2021 14:46:20 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11. 08. 21 14:36, Muni Sekhar wrote: > Hi All, > > $ cat /proc/asound/cards > 0 [USB ]: USB-Audio - Plantronics .Audio 628 USB > Plantronics Plantronics .Audio 628 USB at > usb-0000:00:14.0-2, full speed > > I am using a Plantronics USB Audio headset. > > $ arecord --device hw:0,0 --channels 2 --format S16_LE --rate 44100Hz x.wav > arecord: main:722: audio open error: Device or resource busy > > > 'arecord' command always fails the first time after system boot in my > system. But subsequent execution of the 'arecord' command runs fine. > > > I've attached the strace log for the "audio open error: Device or > resource busy" failure. Is there any fix available for this issue? You may check which other task blocks the PCM device: lsof /dev/snd/pcmC0D0c I guess that it will be pulseaudio (device enumeration). Jaroslav -- Jaroslav Kysela Linux Sound Maintainer; ALSA Project; Red Hat, Inc. 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.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 EC260C4338F for ; Wed, 11 Aug 2021 12:46:50 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (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 2BA2360F22 for ; Wed, 11 Aug 2021 12:46:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2BA2360F22 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=perex.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.94.2) (envelope-from ) id 1mDncu-0007NR-5g; Wed, 11 Aug 2021 08:46:32 -0400 Received: from mail1.perex.cz ([77.48.224.245]) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mDncs-0007NA-MQ for kernelnewbies@kernelnewbies.org; Wed, 11 Aug 2021 08:46:30 -0400 Received: from mail1.perex.cz (localhost [127.0.0.1]) by smtp1.perex.cz (Perex's E-mail Delivery System) with ESMTP id 0C0D7A003F; Wed, 11 Aug 2021 14:46:27 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.perex.cz 0C0D7A003F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=perex.cz; s=default; t=1628685987; bh=QXZXgljJCtdu7MBw+Qb9Nfz9/Rx2MXlzqn/ktvGvLiQ=; h=Subject:To:References:From:Date:In-Reply-To:From; b=wjTLgYX6bmNoLoLnZf78Uz9yjiBaMYm7mn4usY8QEGYxtqfHZNaWk5xXcyX5XRgo0 dQTTdVOrsLxxg60JGtUjYKMUphIZfLCafF7id8r++9NC00OclJAFndtgkPj8AhsW61 Jz2D8EvntPO9Q/2upjFAufkBxFb31YCUi+mf3CDA= Received: from p1gen2.localdomain (unknown [192.168.100.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: perex) by mail1.perex.cz (Perex's E-mail Delivery System) with ESMTPSA; Wed, 11 Aug 2021 14:46:20 +0200 (CEST) Subject: Re: USB-Audio: Device or resource busy (strace log) To: Muni Sekhar , alsa-devel , linux-usb@vger.kernel.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, kernelnewbies References: From: Jaroslav Kysela Message-ID: <41bebccc-7940-8379-0108-047bd1cc92f9@perex.cz> Date: Wed, 11 Aug 2021 14:46:20 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kernelnewbies-bounces@kernelnewbies.org On 11. 08. 21 14:36, Muni Sekhar wrote: > Hi All, > > $ cat /proc/asound/cards > 0 [USB ]: USB-Audio - Plantronics .Audio 628 USB > Plantronics Plantronics .Audio 628 USB at > usb-0000:00:14.0-2, full speed > > I am using a Plantronics USB Audio headset. > > $ arecord --device hw:0,0 --channels 2 --format S16_LE --rate 44100Hz x.wav > arecord: main:722: audio open error: Device or resource busy > > > 'arecord' command always fails the first time after system boot in my > system. But subsequent execution of the 'arecord' command runs fine. > > > I've attached the strace log for the "audio open error: Device or > resource busy" failure. Is there any fix available for this issue? You may check which other task blocks the PCM device: lsof /dev/snd/pcmC0D0c I guess that it will be pulseaudio (device enumeration). Jaroslav -- Jaroslav Kysela Linux Sound Maintainer; ALSA Project; Red Hat, Inc. _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jaroslav Kysela Date: Wed, 11 Aug 2021 12:46:20 +0000 Subject: Re: USB-Audio: Device or resource busy (strace log) Message-Id: <41bebccc-7940-8379-0108-047bd1cc92f9@perex.cz> List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Muni Sekhar , alsa-devel , linux-usb@vger.kernel.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, kernelnewbies On 11. 08. 21 14:36, Muni Sekhar wrote: > Hi All, > > $ cat /proc/asound/cards > 0 [USB ]: USB-Audio - Plantronics .Audio 628 USB > Plantronics Plantronics .Audio 628 USB at > usb-0000:00:14.0-2, full speed > > I am using a Plantronics USB Audio headset. > > $ arecord --device hw:0,0 --channels 2 --format S16_LE --rate 44100Hz x.wav > arecord: main:722: audio open error: Device or resource busy > > > 'arecord' command always fails the first time after system boot in my > system. But subsequent execution of the 'arecord' command runs fine. > > > I've attached the strace log for the "audio open error: Device or > resource busy" failure. Is there any fix available for this issue? You may check which other task blocks the PCM device: lsof /dev/snd/pcmC0D0c I guess that it will be pulseaudio (device enumeration). Jaroslav -- Jaroslav Kysela Linux Sound Maintainer; ALSA Project; Red Hat, Inc.