From: Takashi Iwai <tiwai@suse.de>
To: Jie Yang <yang.jie@intel.com>
Cc: alsa-devel@alsa-project.org, broonie@kernel.org,
liam.r.girdwood@intel.com
Subject: Re: [PATCH v7 4/7] ALSA: hda - Update to use the new jack kctls method
Date: Tue, 21 Apr 2015 11:58:30 +0200 [thread overview]
Message-ID: <s5hmw21zttl.wl-tiwai@suse.de> (raw)
In-Reply-To: <1429603545-21063-5-git-send-email-yang.jie@intel.com>
At Tue, 21 Apr 2015 16:05:42 +0800,
Jie Yang wrote:
>
> In the new jack kctls design, snd_kcontrol can be created
> during snd_jack_new(), or calling snd_jack_add_new_kctls()
> to create and attach to the created jack later.
>
> Here we create jack kctls at the jack creating stage, for
> both phantom/non-phantom jack.
>
> Signed-off-by: Jie Yang <yang.jie@intel.com>
> ---
> sound/pci/hda/hda_jack.c | 53 +++++++++++++++++-------------------------------
> sound/pci/hda/hda_jack.h | 4 +---
> 2 files changed, 20 insertions(+), 37 deletions(-)
>
> diff --git a/sound/pci/hda/hda_jack.c b/sound/pci/hda/hda_jack.c
> index f45c488..3447853 100644
> --- a/sound/pci/hda/hda_jack.c
> +++ b/sound/pci/hda/hda_jack.c
> @@ -132,11 +132,11 @@ void snd_hda_jack_tbl_clear(struct hda_codec *codec)
>
> for (i = 0; i < codec->jacktbl.used; i++, jack++) {
> struct hda_jack_callback *cb, *next;
> -#ifdef CONFIG_SND_HDA_INPUT_JACK
> +
> /* free jack instances manually when clearing/reconfiguring */
> if (!codec->bus->shutdown && jack->jack)
> snd_device_free(codec->bus->card, jack->jack);
> -#endif
> +
> for (cb = jack->callback; cb; cb = next) {
> next = cb->next;
> kfree(cb);
> @@ -337,20 +337,16 @@ void snd_hda_jack_report_sync(struct hda_codec *codec)
> jack = codec->jacktbl.list;
> for (i = 0; i < codec->jacktbl.used; i++, jack++)
> if (jack->nid) {
> - if (!jack->kctl || jack->block_report)
> + if (!jack->jack_kctl || jack->block_report)
The all checks of jack->kctl should be replaced with jack->jack.
That is, you don't have to care about kctl any longer in the hdaudio
side.
Takashi
next prev parent reply other threads:[~2015-04-21 9:58 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-21 8:05 [PATCH v7 0/7] ALSA: jack: Refactoring for jack kctls Jie Yang
2015-04-21 8:05 ` [PATCH v7 1/7] ALSA: jack: implement kctl creating for jack device Jie Yang
2015-04-21 8:05 ` [PATCH v7 2/7] ALSA: Jack: refactoring snd_kctl_jack_new to support embedded kctl Jie Yang
2015-04-21 9:53 ` Takashi Iwai
2015-04-22 0:51 ` Jie, Yang
2015-04-22 5:32 ` Takashi Iwai
2015-04-22 5:33 ` Jie, Yang
2015-04-21 8:05 ` [PATCH v7 3/7] ALSA: jack: extend snd_jack_new to support phantom jack Jie Yang
2015-04-21 9:57 ` Takashi Iwai
2015-04-22 2:06 ` Jie, Yang
2015-04-22 2:51 ` Jie, Yang
2015-04-21 8:05 ` [PATCH v7 4/7] ALSA: hda - Update to use the new jack kctls method Jie Yang
2015-04-21 9:58 ` Takashi Iwai [this message]
2015-04-22 4:56 ` Jie, Yang
2015-04-21 8:05 ` [PATCH v7 5/7] ASoC: jack: create kctls according to jack pins info Jie Yang
2015-04-21 8:05 ` [PATCH v7 6/7] ALSA: jack: remove exporting ctljack functions Jie Yang
2015-04-21 8:05 ` [PATCH v7 7/7] ALSA: Docs: Add documentation for Jack kcontrols Jie Yang
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=s5hmw21zttl.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=liam.r.girdwood@intel.com \
--cc=yang.jie@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox