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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 998DACDB483 for ; Wed, 18 Oct 2023 20:22:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231557AbjJRUWH (ORCPT ); Wed, 18 Oct 2023 16:22:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229726AbjJRUWE (ORCPT ); Wed, 18 Oct 2023 16:22:04 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34A62A4; Wed, 18 Oct 2023 13:22:03 -0700 (PDT) Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 39IILcRX025958; Wed, 18 Oct 2023 20:21:46 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=qcppdkim1; bh=MZK6pqj1ss77uI7PA+Fgrt/RZmQ8X/QTlxXNZEv5AKo=; b=bhhDb/aHD/FKRfI30ps4x9K/6Qf4QmWlDHPdYifAxLKyP9W1rEGEru+aEPWg333pITU5 YXWL3KDM4XQ5PDAkmHT4jv8UA1Tnqz766i1JZizJbePOCgTaUZ0To34E2ioqZDqTcDsL l+j2Yu+zlFpTuLwz5xHG/CDp5qWs0GCT3XTwTkS7i5Bvs0u/lNkBlfwTThxt8N48lyMs Oi1q+4gsVSfPFyoplc0xhK52S3ZeS4JrwlRJu1T5HD4qo2vjZk4tUVxdr19+7sncbGog xpp13+EuCDftUoXCDt3TgZy/h+pJXeyTTLuHxjj+t5yDo3xKk9aD4rxOlSf5+bjXTVtm Mw== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3ttg82s0kc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 18 Oct 2023 20:21:46 +0000 Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 39IKLjTq000644 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 18 Oct 2023 20:21:45 GMT Received: from [10.110.123.255] (10.80.80.8) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.39; Wed, 18 Oct 2023 13:21:44 -0700 Message-ID: <7184bb42-4159-8e99-3ab6-56c115873078@quicinc.com> Date: Wed, 18 Oct 2023 13:21:43 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH v9 20/34] ALSA: usb-audio: Check for support for requested audio format Content-Language: en-US To: Pierre-Louis Bossart , , , , , , , , , , , , , , , CC: , , , , References: <20231017200109.11407-1-quic_wcheng@quicinc.com> <20231017200109.11407-21-quic_wcheng@quicinc.com> From: Wesley Cheng In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: fFipZuSxrJahsBe5JduYXO9dpd0JE-n_ X-Proofpoint-ORIG-GUID: fFipZuSxrJahsBe5JduYXO9dpd0JE-n_ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-18_18,2023-10-18_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 impostorscore=0 mlxlogscore=999 spamscore=0 priorityscore=1501 adultscore=0 bulkscore=0 mlxscore=0 suspectscore=0 lowpriorityscore=0 phishscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2310180167 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Pierre, On 10/17/2023 3:29 PM, Pierre-Louis Bossart wrote: > > > On 10/17/23 15:00, Wesley Cheng wrote: >> Allow for checks on a specific USB audio device to see if a requested PCM >> format is supported. This is needed for support for when playback is > > This is needed for support when playback is > Will fix this typo >> initiated by the ASoC USB backend path. >> >> Signed-off-by: Wesley Cheng >> --- >> sound/usb/card.c | 40 ++++++++++++++++++++++++++++++++++++++++ >> sound/usb/card.h | 11 +++++++++++ >> 2 files changed, 51 insertions(+) >> >> diff --git a/sound/usb/card.c b/sound/usb/card.c >> index c0b312e264bf..88f431917c15 100644 >> --- a/sound/usb/card.c >> +++ b/sound/usb/card.c >> @@ -162,6 +162,46 @@ int snd_usb_unregister_platform_ops(void) >> } >> EXPORT_SYMBOL_GPL(snd_usb_unregister_platform_ops); >> >> +/* >> + * Checks to see if requested audio profile, i.e sample rate, # of >> + * channels, etc... is supported by the substream associated to the >> + * USB audio device. >> + */ >> +struct snd_usb_stream *snd_usb_find_suppported_substream(int card_idx, >> + struct snd_pcm_hw_params *params, int direction) >> +{ >> + struct snd_usb_audio *chip; >> + struct snd_usb_substream *subs = NULL; > > useless init? > Agreed. Thanks Wesley Cheng