Message ID | 20240102214549.22498-23-quic_wcheng@quicinc.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-14893-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp4702825dyb; Tue, 2 Jan 2024 13:59:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IEVbft3cO+ddhxlrKZirmF1Lp1zDygaOFALzTdQ4Ak8qyI1bvaCPz9zcQtWLF+F1YqpG0Gj X-Received: by 2002:a05:6a00:11d3:b0:6da:b46f:9e37 with SMTP id a19-20020a056a0011d300b006dab46f9e37mr44600pfu.55.1704232771972; Tue, 02 Jan 2024 13:59:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704232771; cv=none; d=google.com; s=arc-20160816; b=bVkviSSydbQ7q2L5CYHvqz1415ZztepyWl0hPFeTbecAWeY3qTlf3HZ7zDsKC2wFML HgkP3ua/dhvCaXE8S2PV2yIKc2CeBGQ8ZjnZTQhE+AsJsJ+VdOb/kFCxEx8kFP20b2DE 83LPCmwOC8il+XASx2UXw5P6q95pyWbwlCqUHlVoMPH3LG48/UDZLR93nZzNOEeOvn8h WiDxZ0HhJWcMFkMe1ZUswgiXQvzVd+7sQSqgoRPkqKQ24rudMmNY28pPYJQg5U/EY2Ix NvG0+XcyoCMBmfePuIIUQvo34ld7RYO29tPQJ7+cYXYoDinc2XSZjan8AbVetCofE2ir YZFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Fjij2G5ZCz2q1GRx9e4EEjDB9mY5WYBmc7zvGN19t2k=; fh=0KzismZj+xI0Z//ZGdqKIH/FO9LtSZM7Yj4P0VtrCz0=; b=jx+ohv/yJywjMJ8frjLOWA4/vSmIWusLOtALeCN3DXJRY13X2684gIKdeFxtc3K7/j DZYA6lZxBA7EcxR9FzqygCzk40JZf4h9c/y3UCOXYRlMG9RoNBQ0n68qy/Gyhe7/C8Jj QjGn4F2zh65niu2SmnY8rWzT+fMDYUf0spLMymNmdKk+qEiEK+8V7PX23RUAjys1Muss k8MI53BIZcdffKHcolzZCiJu37S+MCnZE7xQLBdzlHMSypWJqcnS/UUOaf8o8NwUeD+n 5P7meIk5+O62j8dmL7uAhWO37klwMOpDJwFbD2xgAsYGdTYDbyBAh9fm1ICO6xutxUQx b4ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=WGD3T7ff; spf=pass (google.com: domain of linux-kernel+bounces-14893-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14893-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id c16-20020a630d10000000b005cdc05e6631si20422433pgl.261.2024.01.02.13.59.31 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 13:59:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-14893-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=WGD3T7ff; spf=pass (google.com: domain of linux-kernel+bounces-14893-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14893-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id BB779284CED for <ouuuleilei@gmail.com>; Tue, 2 Jan 2024 21:59:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C84A62111B; Tue, 2 Jan 2024 21:47:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="WGD3T7ff" X-Original-To: linux-kernel@vger.kernel.org Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (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 DDC9F1D523; Tue, 2 Jan 2024 21:46:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 402LdJYb022857; Tue, 2 Jan 2024 21:46:25 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type; s=qcppdkim1; bh=Fjij2G5ZCz2q1GRx9e4E EjDB9mY5WYBmc7zvGN19t2k=; b=WGD3T7ff9h7uIUqNsZZRRtX1A3FZf1CzBsgw z19QF0zeLLvHs2ZJBqdX0RGIktxBdIiSZsMtnDjkZO5kukZ1Jr1mkQdaUNZwFXkZ 1os1O+fGCfK7Arl76hCCPCnkXuSUimYWXU8WxBUqSgeAnXO20s4BQBnhOIkOmPha HL1cOHkits8wQp2p2fE2/6ohQYLuzWshgxdAQOyDizsx1A0N1mlKi8FuYx++Z87v JelDBSWAHsht22JvVQ/dvZvKBE7xh6kLQxfiwPVPz3x8F+3WeXN6QfM1At4xlSbt 4fjX/ZiP4O3pnXS0INn65rOy61SDHMWist0qHrEjaDBn0Wv/Vg== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vcqak8dk2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 02 Jan 2024 21:46:25 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 402LkO4j003254 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 2 Jan 2024 21:46:24 GMT Received: from hu-wcheng-lv.qualcomm.com (10.49.16.6) 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.40; Tue, 2 Jan 2024 13:46:24 -0800 From: Wesley Cheng <quic_wcheng@quicinc.com> To: <srinivas.kandagatla@linaro.org>, <mathias.nyman@intel.com>, <perex@perex.cz>, <conor+dt@kernel.org>, <corbet@lwn.net>, <gregkh@linuxfoundation.org>, <lgirdwood@gmail.com>, <andersson@kernel.org>, <krzysztof.kozlowski+dt@linaro.org>, <konrad.dybcio@linaro.org>, <Thinh.Nguyen@synopsys.com>, <broonie@kernel.org>, <bgoswami@quicinc.com>, <tiwai@suse.com>, <robh+dt@kernel.org>, <agross@kernel.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>, Wesley Cheng <quic_wcheng@quicinc.com> Subject: [PATCH v12 22/41] ASoC: qcom: qdsp6: Ensure PCM format is supported by USB audio device Date: Tue, 2 Jan 2024 13:45:30 -0800 Message-ID: <20240102214549.22498-23-quic_wcheng@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240102214549.22498-1-quic_wcheng@quicinc.com> References: <20240102214549.22498-1-quic_wcheng@quicinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain X-ClientProxiedBy: nalasex01c.na.qualcomm.com (10.47.97.35) 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: 2MBL_vq5hB_yg86rRun3t6jnSHdCfDaB X-Proofpoint-ORIG-GUID: 2MBL_vq5hB_yg86rRun3t6jnSHdCfDaB X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-09_02,2023-12-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 malwarescore=0 mlxlogscore=999 impostorscore=0 suspectscore=0 spamscore=0 clxscore=1015 priorityscore=1501 phishscore=0 bulkscore=0 mlxscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2401020160 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787017583157678272 X-GMAIL-MSGID: 1787017583157678272 |
Series |
Introduce QC USB SND audio offloading support
|
|
Commit Message
Wesley Cheng
Jan. 2, 2024, 9:45 p.m. UTC
Check for if the PCM format is supported during the hw_params callback. If
the profile is not supported then the userspace ALSA entity will receive an
error, and can take further action.
Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
---
sound/soc/qcom/qdsp6/q6usb.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/sound/soc/qcom/qdsp6/q6usb.c b/sound/soc/qcom/qdsp6/q6usb.c index 00cba1021dc6..833a57deb321 100644 --- a/sound/soc/qcom/qdsp6/q6usb.c +++ b/sound/soc/qcom/qdsp6/q6usb.c @@ -46,7 +46,11 @@ static int q6usb_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, struct snd_soc_dai *dai) { - return 0; + struct q6usb_port_data *data = dev_get_drvdata(dai->dev); + int direction = substream->stream; + + return snd_soc_usb_find_format(data->active_usb_chip_idx, params, + direction); } static const struct snd_soc_dai_ops q6usb_ops = {