From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
To: JaeHun Jung <jh0801.jung@samsung.com>
Cc: tiwai@suse.de, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ANDROID: sound: usb: Add vendor's hooking interface
Date: Wed, 17 Jun 2020 13:02:48 +0900 [thread overview]
Message-ID: <20200617040248.GA245386@workstation> (raw)
In-Reply-To: <1592360304-29621-1-git-send-email-jh0801.jung@samsung.com>
Hi,
On Wed, Jun 17, 2020 at 11:18:24AM +0900, JaeHun Jung wrote:
> In mobile, a co-processor is used when using USB audio
> to improve power consumption.
> hooking is required for sync-up when operating
> the co-processor. So register call-back function.
> The main operation of the call-back function is as follows:
> - Initialize the co-processor by transmitting data
> when initializing.
> - Change the co-processor setting value through
> the interface function.
> - Configure sampling rate
> - pcm open/close
>
> Bug: 156315379
>
> Change-Id: I32e1dd408e64aaef68ee06c480c4b4d4c95546dc
> Signed-off-by: JaeHun Jung <jh0801.jung@samsung.com>
> ---
> sound/usb/card.c | 16 ++++++++++++++++
> sound/usb/card.h | 1 +
> sound/usb/clock.c | 5 +++++
> sound/usb/pcm.c | 33 +++++++++++++++++++++++++++++++++
> sound/usb/usbaudio.h | 30 ++++++++++++++++++++++++++++++
> 5 files changed, 85 insertions(+)
> diff --git a/sound/usb/card.c b/sound/usb/card.c
> index fd6fd17..2f3fa14 100644
> --- a/sound/usb/card.c
> +++ b/sound/usb/card.c
> @@ -111,6 +111,7 @@ MODULE_PARM_DESC(skip_validation, "Skip unit descriptor validation (default: no)
> static DEFINE_MUTEX(register_mutex);
> static struct snd_usb_audio *usb_chip[SNDRV_CARDS];
> static struct usb_driver usb_audio_driver;
> +struct snd_usb_audio_vendor_ops *usb_audio_ops;
>
> /*
> * disconnect streams
> @@ -210,6 +211,12 @@ static int snd_usb_create_stream(struct snd_usb_audio *chip, int ctrlif, int int
> return 0;
> }
>
> +void snd_set_vender_interface(struct snd_usb_audio_vendor_ops *vendor_ops)
> +{
> + usb_audio_ops = vendor_ops;
> +}
> +EXPORT_SYMBOL_GPL(snd_set_vender_interface);
I think the symbol name has typo; 'vender' against 'vendor'.
Anyway, this feature is not widely used at present. I suggest to add
kernel configuration for the feature at kernel compilation time, IMO.
Regards
Takashi Sakamoto
next prev parent reply other threads:[~2020-06-17 4:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20200617022554epcas2p214a49f03a15e504d8faa28148e06e796@epcas2p2.samsung.com>
2020-06-17 2:18 ` [PATCH] ANDROID: sound: usb: Add vendor's hooking interface JaeHun Jung
2020-06-17 2:18 ` JaeHun Jung
2020-06-17 4:02 ` Takashi Sakamoto [this message]
2020-06-18 8:12 ` Christoph Hellwig
2020-06-18 8:12 ` Christoph Hellwig
2020-06-18 12:27 ` Pierre-Louis Bossart
[not found] <CGME20200617020305epcas2p35de377f38ec42a41adb47a49dfc33791@epcas2p3.samsung.com>
2020-06-17 1:55 ` JaeHun Jung
2020-06-17 5:17 ` Greg KH
2020-06-17 7:52 ` Greg KH
2020-06-17 9:10 ` 정재훈
2020-06-17 9:44 ` Greg KH
[not found] <CGME20200616113032epcas2p19a45e49c1899f81358a0a41d5db4f8e8@epcas2p1.samsung.com>
2020-06-16 11:22 ` JaeHun Jung
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=20200617040248.GA245386@workstation \
--to=o-takashi@sakamocchi.jp \
--cc=alsa-devel@alsa-project.org \
--cc=jh0801.jung@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tiwai@suse.de \
/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.