Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp611938lqo; Wed, 8 May 2024 09:22:48 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXsWn9v1Hi0NS+eikU4BihWOyoxenr66+X2LXCHfkAvHErLNEDo+AvHSc4ZKqgZMldZuOSGJcojXqGDxHR/nHpD4b5C/AsTGiGjq9Huzg== X-Google-Smtp-Source: AGHT+IFyH7CBgpzgVBXb3Cx5ryYCMEIV9ucTCujGlNaDuhlQCjKpJtwjkP3tiGTunmNzJLB51viJ X-Received: by 2002:a17:906:f917:b0:a59:b02a:90e7 with SMTP id a640c23a62f3a-a59fb9f0eeemr205799866b.64.1715185368048; Wed, 08 May 2024 09:22:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715185368; cv=pass; d=google.com; s=arc-20160816; b=T/U5lKmr7rOqm5s8Egci6DDsusIdRqoYm6dhpLQhyaRUkbpW+eFO+cUcFc1tlCG0Bf CYUjbjvg2Pgo8T2Zht52RYumMAxFaYdxHOp94VRST8qA+OKhI0jidSRfFbzyjpTB8MTz duWio+SL79gZtPljBXXY0u8uBe60l4fkPwRtmzVBbHHc4uZ0kXmujqldiCTrhnWqO7fL C3EBOcARrskN/wlM1tH4Iou7vwM29I3jn8JDfbUQKpucVOESfYnorpF824NxCYau/p+n 5Slql6JAVhEhirHg9+S+LwHO4nPjM5qaLQlwr9bNUR1mf34VOOOu+gOpv/i1YZte3Zz7 1AdA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=V8LwHQFQFbql5MfP/kMjapeZtycm56g6tLx9E6s1iuY=; fh=3eVbvXVT2F7w23cFT6imnzbn3TO4xlidhy25820AHtI=; b=lo7lXsDdb8IIrxTQJWMYkHc6k2IAONfDnAEqxRClvPSOMBnk0dvWPZGksnuz8bkzrd W8nh8dFUGjDKlEk/DkIjy3KyfbubI/6TqtwPwNFeGw1zephvfnKVHizS8TU7DypQH0ZT qkb1W8NAk+jQ+NH5ZcirpZ94BYy9uOFl7Ff0qt0ir9JZ3J6xOQnwvRub4fPeJZTggOjZ Yc4H8YgL+hdp8709JDQVhWReegSOFn3GG2Ak3uTFgGe413tvJvro0NJmgKUxr8wFyd9y J/hjN+AerGfgzxt8kdHo7t/F1hOYm2cix6GUivuFKLej6XbBlw2XL6BjdnLCMTlYz9zm rs3w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=iW037m9f; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-173290-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173290-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id oz10-20020a1709077d8a00b00a59a6ce7616si5760288ejc.902.2024.05.08.09.22.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 09:22:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-173290-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=iW037m9f; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-173290-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173290-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 017E21F25D13 for ; Wed, 8 May 2024 13:18:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9E99586252; Wed, 8 May 2024 13:16:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="iW037m9f" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6443185953; Wed, 8 May 2024 13:16:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715174177; cv=none; b=RtkUKHaTJxuPYpBUtacfK/A8Y5/Ndnd+dEjDtc4MeUdpwXsLRhjvP6n5bVZFxI3vbNyjCb1jxHom7z+ubR4jHIJffNqR1jTHGlpMiB8NnuCpfkbEa6ad8AOr62VvUXP464LiZq+4XYaTebWnSPRn/FuAdfWiwDkbGE3Wzpihvp0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715174177; c=relaxed/simple; bh=w+yqx0L73Rw5gOHQQ+B8HtBku2W//pUToQXNgXyM9nQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=un4fOtEz+vNXjZHF1THQkx9krL1GpzAOArDVXwjPyW52mkhVDFmZqxElG3n7giHC0rgj3ldvsEGgRKv4eJtL9D/Y7McWPr2Q4nEdKzf7NLwOOhzX/4GXDjbR2FDPSR1wtkwEcr2z4b7tJhCfnhWRydqlVNeuqMB1h84X6exZcHI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=iW037m9f; arc=none smtp.client-ip=192.198.163.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715174176; x=1746710176; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=w+yqx0L73Rw5gOHQQ+B8HtBku2W//pUToQXNgXyM9nQ=; b=iW037m9f0rRRimiJ2QJ/vPq8TUsOsT8KrBHjMs8ytrbEqY9uX2xdfFSi GfP7sPAVjJIYDl25+BGOobL3YWE89LszMPkTzUg3rdgs+3cA3F72RdY/o CDVqbsUyU6Tlf6g5QaqFa5leYpOMb6ihkseVbRdZ/D19iut3MoZ8llk2v u0QX/TRXaC3a7F34a9eM4dEXdceVz3KBqXORLo/f78odticQjeZSxwVDK d7QvONHzTA+t0rCTvS8zOgH2vpdlNQfMVdvIyccuHYM4dvzWEq2sBvpM3 wTDqB9XXr+6HELWtx1KbMXEGdyWo9ap3cehoVUtoLTItDTyb1yQ8/P77T w==; X-CSE-ConnectionGUID: NDfYA/LCQ5SAEjEUcUuimg== X-CSE-MsgGUID: DuqsdrvqRFy9d+9Iz7SrlQ== X-IronPort-AV: E=McAfee;i="6600,9927,11066"; a="36413253" X-IronPort-AV: E=Sophos;i="6.08,145,1712646000"; d="scan'208";a="36413253" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 May 2024 06:16:16 -0700 X-CSE-ConnectionGUID: qvfIbtIxQJKu8CEdUpwLzQ== X-CSE-MsgGUID: zrr7iwQZQ9+qWMTGxnuokw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,145,1712646000"; d="scan'208";a="33356785" Received: from sskolar-mobl.amr.corp.intel.com (HELO [10.212.67.115]) ([10.212.67.115]) by fmviesa005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 May 2024 06:16:14 -0700 Message-ID: <875b643f-af2c-4a1b-87e8-80cd6f236dea@linux.intel.com> Date: Tue, 7 May 2024 16:23:51 -0500 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v21 26/39] ASoC: qcom: qdsp6: Add support to track available USB PCM devices To: Wesley Cheng , srinivas.kandagatla@linaro.org, mathias.nyman@intel.com, perex@perex.cz, conor+dt@kernel.org, corbet@lwn.net, lgirdwood@gmail.com, andersson@kernel.org, krzk+dt@kernel.org, gregkh@linuxfoundation.org, Thinh.Nguyen@synopsys.com, broonie@kernel.org, bgoswami@quicinc.com, tiwai@suse.com, bagasdotme@gmail.com, robh@kernel.org, konrad.dybcio@linaro.org Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-sound@vger.kernel.org, linux-usb@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-doc@vger.kernel.org, alsa-devel@alsa-project.org References: <20240507195116.9464-1-quic_wcheng@quicinc.com> <20240507195116.9464-27-quic_wcheng@quicinc.com> Content-Language: en-US From: Pierre-Louis Bossart In-Reply-To: <20240507195116.9464-27-quic_wcheng@quicinc.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit > @@ -113,6 +120,12 @@ static int q6usb_alsa_connection_cb(struct snd_soc_usb *usb, > if (connected) { > /* We only track the latest USB headset plugged in */ > data->active_usb_chip_idx = sdev->card_idx; > + > + set_bit(sdev->card_idx, &data->available_card_slot); > + data->status[sdev->card_idx].sdev = sdev; Not following the 'only track the latest USB headset plugged in', I don't see anything that discard the previously latest headset... If you plug headset1, then headset2, how is headset1 marked as not available for USB offload? > + } else { > + clear_bit(sdev->card_idx, &data->available_card_slot); > + data->status[sdev->card_idx].sdev = NULL; > } > > return 0;