From: Jie Yang <yang.jie@intel.com>
To: tiwai@suse.de
Cc: alsa-devel@alsa-project.org, broonie@kernel.org,
liam.r.girdwood@intel.com
Subject: [PATCH v7 5/7] ASoC: jack: create kctls according to jack pins info
Date: Tue, 21 Apr 2015 16:05:43 +0800 [thread overview]
Message-ID: <1429603545-21063-6-git-send-email-yang.jie@intel.com> (raw)
In-Reply-To: <1429603545-21063-1-git-send-email-yang.jie@intel.com>
In the new jack kctls design, we can create kctls according to
pins info:
1. during jack creating, snd_jack_new() with NULL jack_kctl;
2. for each pin, call snd_jack_add_kctl() to add one kctl
(it will call snd_ctl_add() to add kctl to card);
Signed-off-by: Jie Yang <yang.jie@intel.com>
---
sound/soc/soc-jack.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c
index 836368b..b53f316 100644
--- a/sound/soc/soc-jack.c
+++ b/sound/soc/soc-jack.c
@@ -197,6 +197,7 @@ int snd_soc_jack_add_pins(struct snd_soc_jack *jack, int count,
INIT_LIST_HEAD(&pins[i].list);
list_add(&(pins[i].list), &jack->pins);
+ snd_jack_add_new_kctl(jack->jack, pins[i].pin, pins[i].mask);
}
/* Update to reflect the last reported status; canned jack
--
1.9.1
next prev parent reply other threads:[~2015-04-21 8:02 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
2015-04-22 4:56 ` Jie, Yang
2015-04-21 8:05 ` Jie Yang [this message]
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=1429603545-21063-6-git-send-email-yang.jie@intel.com \
--to=yang.jie@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=liam.r.girdwood@intel.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox