Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp265153lqd; Wed, 24 Apr 2024 01:15:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWSYqMwV9nCNeDNocsQUPJC7Q690Rpyzw57dGLm75bcaA2ZFfPf0/5b7H/u+r3rpPVI9kY9YHasyvPpvWuoYl8E9rEct9P6rytBxgraOA== X-Google-Smtp-Source: AGHT+IG29WVPNzeOkvs5cUHsuFt87A2CuRsZmLaS4jtw4RlbDPG0dgTN+5vj75Jd6jLReTvdf+bf X-Received: by 2002:a17:90a:ce03:b0:2a2:7992:fbf5 with SMTP id f3-20020a17090ace0300b002a27992fbf5mr1664608pju.48.1713946544267; Wed, 24 Apr 2024 01:15:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713946544; cv=pass; d=google.com; s=arc-20160816; b=wmN8HDzfthFo4bzkFzpEqF0TPMngBdABqTbZjZQOGIPawWWjKCMv7+i2qgpew7HfyO Jsh9u9tsKLncjPVItShJhVuiRB1HeRd9HJU2kHXkT5msVL8Di8nl8Fwo1tE6o/cUBaCm ILZNpEaD/7gFJjfJB39eLMZu63IVqT7OgE+cZEkb2LHda58nJW8qRSyTeDoS1/L1yKzT mpZ7EHaooaL+wpcHkr4ZmZkSNd6+dP9EJyXlZVM9szRZ/CNFuEmQ9hQoOFjD20A+NLpu M0cr/5ycn9j2tXCqfyHldtwl+txh9PLbvcsrzTdK4kqaequbNTCAXQXJmwaBCPt0/Ueg qraw== 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:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature :dkim-signature; bh=dJDTdUlPbAgSrxHoAZWyu8CoyPGgNy6TBTmbanzmv/4=; fh=jz65401Hu91Kt8sGLxb0Ld7NvAiBzWVQbFMHUf73ACo=; b=n5GTS7ibC4UyzVVSeK1YYP0d4QcYMabb5AmyUqFwUJWHKi/ro7786YD6UeZ8fKcdWK jI5juM/DOspJuOqsNKRBggjlPoAK+FQrvPEmHYF0jes+RtD25/8ohbW7nh5iIp4r0hf1 n9Vh7E/CtZS3kHqOp6IP5gscc9TVOK42GasXWlcd65rKVdKN7ufTKQkbCCrD2cGCVDRG 9G8/DqpV1IF5oTbbsop9YGtKi91tYpHwwZ3vafjfey5nOKMaSddNF2kJCc+WqsBxk9NN YMZPvmMVX6aEatrI+h3ij2u5Qmf3pzmL8m9V97AAc28ZeTlY8EwZXQ6J5fEvhB8OJzhI WIwQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ivitera.com header.s=mail header.b="nVZa8yK/"; dkim=pass header.i=@ivitera.com header.s=mail header.b="nVZa8yK/"; arc=pass (i=1 spf=pass spfdomain=ivitera.com dkim=pass dkdomain=ivitera.com dkim=pass dkdomain=ivitera.com dmarc=pass fromdomain=ivitera.com); spf=pass (google.com: domain of linux-kernel+bounces-156510-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156510-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ivitera.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id o19-20020a17090ac09300b002adc550f498si5149184pjs.153.2024.04.24.01.15.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 01:15:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-156510-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@ivitera.com header.s=mail header.b="nVZa8yK/"; dkim=pass header.i=@ivitera.com header.s=mail header.b="nVZa8yK/"; arc=pass (i=1 spf=pass spfdomain=ivitera.com dkim=pass dkdomain=ivitera.com dkim=pass dkdomain=ivitera.com dmarc=pass fromdomain=ivitera.com); spf=pass (google.com: domain of linux-kernel+bounces-156510-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156510-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ivitera.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 0F4C7B23010 for ; Wed, 24 Apr 2024 07:56:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0EDAA158A0F; Wed, 24 Apr 2024 07:55:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ivitera.com header.i=@ivitera.com header.b="nVZa8yK/"; dkim=pass (1024-bit key) header.d=ivitera.com header.i=@ivitera.com header.b="nVZa8yK/" Received: from smtp.ivitera.com (smtp.ivitera.com [88.101.85.59]) (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 DC4F51581FB; Wed, 24 Apr 2024 07:55:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=88.101.85.59 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713945335; cv=none; b=oG2j4S5soeauxaaxdB2uz3N4T1WU6P2I6+zhFnpoAWIJmVO/9Hc51gYn42GyW615q5oI+z/Hz5GWFI490kyt89sdngIUq5ebvPdcUVYN7KIQCslVWpbR9syT78QlmG2msJj7P1jUefIGIWIoOisuZknPiAwazG9MhqFCGJLjMho= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713945335; c=relaxed/simple; bh=NNQ3HLb0v99awGjFWIkxNZ/8CBlj1+lvLPyh6ShnZ7Q=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=NO5UPRXT6RIay7+Iyy0Aa3thM/CuK6NcLQQ52aCle/c9dAV0yseL0CvWnsGlYilQ7r5Kzzb9yMZS+8D9bfsya5gt8Nzu9tHyMJxOv/IXNgI24odLotC+TzoMiPJ6uv4m5wVlccez8HHiPctQby+ECKNS9mGbn2taL5nvV+eZ4rY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ivitera.com; spf=pass smtp.mailfrom=ivitera.com; dkim=pass (1024-bit key) header.d=ivitera.com header.i=@ivitera.com header.b=nVZa8yK/; dkim=pass (1024-bit key) header.d=ivitera.com header.i=@ivitera.com header.b=nVZa8yK/; arc=none smtp.client-ip=88.101.85.59 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ivitera.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ivitera.com Received: from localhost (localhost [127.0.0.1]) by smtp.ivitera.com (Postfix) with ESMTP id 9DEA8170DD2; Wed, 24 Apr 2024 09:55:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ivitera.com; s=mail; t=1713945330; bh=NNQ3HLb0v99awGjFWIkxNZ/8CBlj1+lvLPyh6ShnZ7Q=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=nVZa8yK/ZLHki+moAtSxnn48z1AN9oiZpUFPJ9TZWOUX7J8hXkFSqNCdAfuk4vJVu FktYKLH7Jc/BF882Q1ECKaaz9XFwmh4ATrYaNcCU0zssAmkugXO4vHZ9tQBNTh8HA/ KOn2DFu4UeI1DWdbKttc5u0oTy0W75Wo7+c0G6z4= Received: from smtp.ivitera.com ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rHo5XKKDmSGk; Wed, 24 Apr 2024 09:55:30 +0200 (CEST) Received: from [192.168.105.22] (dustin.pilsfree.net [81.201.58.138]) (Authenticated sender: pavel) by smtp.ivitera.com (Postfix) with ESMTPSA id 0B33C170DCF; Wed, 24 Apr 2024 09:55:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ivitera.com; s=mail; t=1713945330; bh=NNQ3HLb0v99awGjFWIkxNZ/8CBlj1+lvLPyh6ShnZ7Q=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=nVZa8yK/ZLHki+moAtSxnn48z1AN9oiZpUFPJ9TZWOUX7J8hXkFSqNCdAfuk4vJVu FktYKLH7Jc/BF882Q1ECKaaz9XFwmh4ATrYaNcCU0zssAmkugXO4vHZ9tQBNTh8HA/ KOn2DFu4UeI1DWdbKttc5u0oTy0W75Wo7+c0G6z4= Message-ID: <9b40e148-f3eb-f8f5-bf2d-37a0a0629417@ivitera.com> Date: Wed, 24 Apr 2024 09:55:29 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH v2] usb: gadget: f_uac2: Expose all string descriptors through configfs. Content-Language: en-US To: Chris Wulff , "linux-usb@vger.kernel.org" Cc: Greg Kroah-Hartman , James Gruber , Lee Jones , "linux-kernel@vger.kernel.org" , "linux-api@vger.kernel.org" References: From: Pavel Hofman In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 23. 04. 24 19:22, Chris Wulff wrote: >> From: Pavel Hofman >> Sent: Tuesday, April 23, 2024 11:38 AM > >>> +             p_it_name               playback input terminal name >>> +             p_ot_name               playback output terminal name >>> +             p_fu_name               playback function unit name >>> +             p_alt0_name             playback alt mode 0 name >>> +             p_alt1_name             playback alt mode 1 name >> >> Nacked-by: Pavel Hofman >> >> I am not sure adding a numbered parameter for every additional alt mode >> is a way to go for the future. I am not that much concerned about UAC1, >> but IMO (at least) in UAC2 the configuration method should be flexible >> for more alt setttings. I can see use cases with many more altsettings. >> >> My proposal for adding more alt settings >> https://urldefense.com/v3/__https://lore.kernel.org/linux-usb/35be4668-58d3-894a-72cf-de1afaacae45@ivitera.com/__;!!HBnMciuwfVSXJQ!TYg7j7-fh3eZAzPfiONi2lo54mf2qsWtpG0nwdaQwSqd1nGdKkTDN8o6_lSIWlWPtHoc-2Nz1KCbRhiXJnzXO8Ku1w$ >> suggested using lists to existing parameters where each item would >> correspond to the alt setting of the same index (+1). That would allow >> using more altsettings easily, without having to add parameters to the >> source code and adding configfs params. I received no feedback. I do not >> push the param list proposal, but I am convinced an acceptable solution >> should be discussed thoroughly by the UAC2 gadget stakeholders. >> >> I am afraid that once p_alt1_name/c_alt1_name params are accepted, there >> will be no way back because subsequent removal of configfs params could >> be viewed as a regression for users. > > I have been thinking about this as well. The alt names are slightly different than the rest of the settings > since they also include alt mode 0. I was thinking p/c_alt1_name could be expanded to the array so > that the entries line up with the other settings and don't have an extra entry for alt 0. Perhaps a different > name would make more sense. > > Along those lines, I didn't see any gadget drivers using an array of strings for anything, which is also why > I didn't try to do anything here that merged alt0/1 names into an array. If we were to do an array of strings > I'm not sure what the best separator would be. Maybe ";"? The rates array uses ",". > > This patch only exposes the existing strings to make them configurable, but I don't want to do anything > that would preclude a nice interface for extra alt modes. > Thanks a lot for your response. Please can you take a look at https://lore.kernel.org/linux-usb/72e9b581-4a91-2319-cb9f-0bcb370f34a1@ivitera.com/T/#m68560853b0c7bc2478942d1f953caa2ac95512bd ? If the params in the upper level were to stand as defaults for the altsettings (and for the existing altsetting 1 if no specific altset subdir configs were given), maybe the naming xxx_alt1_xxx could become a bit confusing. E.g. p_altx_name or p_alt_non0_name? Thanks a lot, Pavel.