From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: saranya.gopal@intel.com
Cc: linux-usb@vger.kernel.org, felipe.balbi@linux.intel.com,
rajaram.regupathy@intel.com, abhilash.k.v@intel.com,
m.balaji@intel.com
Subject: [V2] usbcore: Select UAC3 configuration for audio if present
Date: Tue, 11 Sep 2018 21:55:56 +0200 [thread overview]
Message-ID: <20180911195556.GA6289@kroah.com> (raw)
On Wed, Sep 12, 2018 at 01:03:57AM +0530, saranya.gopal@intel.com wrote:
> From: Saranya Gopal <saranya.gopal@intel.com>
Any reason you forgot to cc: the usb maintainer? :)
>
> USB audio class 3.0 specification introduced many significant
> changes like
> - new power domains, support for LPM/L1
> - new cluster descriptor
> - new high capability and class-specific string descriptors
> - BADD profiles
> - ... and many other things (check spec from link below:
> http://www.usb.org/developers/docs/devclass_docs/USB_Audio_v3.0.zip)
>
> Now that UAC3 is supported in linux, choose UAC3
> configuration for audio if the device supports it.
> Selecting this configuration will enable the system to
> save power by leveraging the new power domains and LPM L1
> capability and also support new codec types and data formats
> for consumer audio applications.
>
> Signed-off-by: Saranya Gopal <saranya.gopal@intel.com>
> Reviewed-by: Felipe Balbi <felipe.balbi@linux.intel.com>
> ---
> Changes from V1: Deleted nested if check for is_uac3_config
>
> drivers/usb/core/generic.c | 27 +++++++++++++++++++++++++++
> 1 file changed, 27 insertions(+)
>
> diff --git a/drivers/usb/core/generic.c b/drivers/usb/core/generic.c
> index bc8242b..df38d5a 100644
> --- a/drivers/usb/core/generic.c
> +++ b/drivers/usb/core/generic.c
> @@ -21,6 +21,7 @@
>
> #include <linux/usb.h>
> #include <linux/usb/hcd.h>
> +#include <uapi/linux/usb/audio.h>
> #include "usb.h"
>
> static inline const char *plural(int n)
> @@ -42,6 +43,16 @@ static int is_activesync(struct usb_interface_descriptor *desc)
> && desc->bInterfaceProtocol == 1;
> }
>
> +static int is_audio(struct usb_interface_descriptor *desc)
bool?
> +{
> + return desc->bInterfaceClass == USB_CLASS_AUDIO;
> +}
> +
> +static int is_uac3_config(struct usb_interface_descriptor *desc)
bool?
thanks,
greg k-h
next reply other threads:[~2018-09-11 19:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-11 19:55 Greg Kroah-Hartman [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-09-11 19:33 [V2] usbcore: Select UAC3 configuration for audio if present saranya.gopal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180911195556.GA6289@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=abhilash.k.v@intel.com \
--cc=felipe.balbi@linux.intel.com \
--cc=linux-usb@vger.kernel.org \
--cc=m.balaji@intel.com \
--cc=rajaram.regupathy@intel.com \
--cc=saranya.gopal@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.