From: David Henningsson <david.henningsson@canonical.com>
To: Takashi Iwai <tiwai@suse.de>,
ALSA Development Mailing List <alsa-devel@alsa-project.org>
Subject: Tests of the hda-jack branch
Date: Tue, 29 Nov 2011 20:43:06 +0100 [thread overview]
Message-ID: <4ED535CA.1080108@canonical.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 393 bytes --]
Hi Takashi,
I've done some more tests of your branch now, and the new names seems to
work for my machine here.
I'm attaching two patches - one adds a "device index" for mapping
against pcm devices on HDMI, the other one is a backport for the
driver-build tree.
What are your thoughts on how to proceed, when do you think this is
ready to be merged into the topic/hda branch?
// David
[-- Attachment #2: 0001-alsa-driver-build-Make-new-jack-API-compile-on-older.patch --]
[-- Type: text/x-patch, Size: 982 bytes --]
>From 0f14d27ffebf72b636c765e95003c780a1cb8c07 Mon Sep 17 00:00:00 2001
From: David Henningsson <david.henningsson@canonical.com>
Date: Tue, 29 Nov 2011 19:41:27 +0100
Subject: [PATCH] alsa-driver-build: Make new jack API compile on older
kernels
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
---
acore/ctljack.c | 4 ++++
pci/hda/hda_jack.c | 3 +++
2 files changed, 7 insertions(+), 0 deletions(-)
create mode 100644 acore/ctljack.c
create mode 100644 pci/hda/hda_jack.c
diff --git a/acore/ctljack.c b/acore/ctljack.c
new file mode 100644
index 0000000..4d9352f
--- /dev/null
+++ b/acore/ctljack.c
@@ -0,0 +1,4 @@
+#define __NO_VERSION__
+#include "adriver.h"
+#include "../alsa-kernel/core/ctljack.c"
+
diff --git a/pci/hda/hda_jack.c b/pci/hda/hda_jack.c
new file mode 100644
index 0000000..160ad73
--- /dev/null
+++ b/pci/hda/hda_jack.c
@@ -0,0 +1,3 @@
+#include "adriver.h"
+#include "../../alsa-kernel/pci/hda/hda_jack.c"
+
--
1.7.5.4
[-- Attachment #3: 0001-ALSA-HDA-Jack-Make-device-indices-for-HDMI.patch --]
[-- Type: text/x-patch, Size: 2637 bytes --]
>From 4b4c17927eb05b460a9788d9dfc9a03ace5d160e Mon Sep 17 00:00:00 2001
From: David Henningsson <david.henningsson@canonical.com>
Date: Tue, 29 Nov 2011 20:19:56 +0100
Subject: [PATCH] ALSA: HDA/Jack: Make device indices for HDMI
Make sure we can associate HDMI Jacks with the correct PCM devices.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
---
sound/pci/hda/hda_jack.c | 5 +++--
sound/pci/hda/hda_jack.h | 2 +-
sound/pci/hda/patch_hdmi.c | 3 ++-
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/sound/pci/hda/hda_jack.c b/sound/pci/hda/hda_jack.c
index 3949015..0b1f72c 100644
--- a/sound/pci/hda/hda_jack.c
+++ b/sound/pci/hda/hda_jack.c
@@ -210,7 +210,7 @@ EXPORT_SYMBOL_HDA(snd_hda_jack_report_sync);
* will have the given name and index.
*/
int snd_hda_jack_add_kctl(struct hda_codec *codec, hda_nid_t nid,
- const char *name, int idx)
+ const char *name, int idx, int device)
{
struct hda_jack_tbl *jack;
struct snd_kcontrol *kctl;
@@ -223,6 +223,7 @@ int snd_hda_jack_add_kctl(struct hda_codec *codec, hda_nid_t nid,
kctl = snd_kctl_jack_new(name, idx, codec);
if (!kctl)
return -ENOMEM;
+ kctl->id.device = device;
if (snd_hda_ctl_add(codec, nid, kctl) < 0)
return -ENOMEM;
jack->kctl = kctl;
@@ -249,7 +250,7 @@ static int add_jack_kctl(struct hda_codec *codec, hda_nid_t nid,
return 0;
snd_hda_get_pin_label(codec, nid, cfg, name, sizeof(name), &idx);
- err = snd_hda_jack_add_kctl(codec, nid, name, idx);
+ err = snd_hda_jack_add_kctl(codec, nid, name, idx, 0);
if (err < 0)
return err;
return snd_hda_jack_detect_enable(codec, nid, 0);
diff --git a/sound/pci/hda/hda_jack.h b/sound/pci/hda/hda_jack.h
index f8f97c7..fcca96c 100644
--- a/sound/pci/hda/hda_jack.h
+++ b/sound/pci/hda/hda_jack.h
@@ -76,7 +76,7 @@ static inline bool is_jack_detectable(struct hda_codec *codec, hda_nid_t nid)
}
int snd_hda_jack_add_kctl(struct hda_codec *codec, hda_nid_t nid,
- const char *name, int idx);
+ const char *name, int idx, int device);
int snd_hda_jack_add_kctls(struct hda_codec *codec,
const struct auto_pin_cfg *cfg);
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index bb8cfc6..9689c8d 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -1277,7 +1277,8 @@ static int generic_hdmi_build_controls(struct hda_codec *codec)
if (err < 0)
return err;
err = snd_hda_jack_add_kctl(codec, per_pin->pin_nid,
- "HDMI", pin_idx);
+ "HDMI", pin_idx,
+ spec->pcm_rec[pin_idx].device);
if (err < 0)
return err;
}
--
1.7.5.4
[-- Attachment #4: Type: text/plain, Size: 0 bytes --]
next reply other threads:[~2011-11-29 19:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-29 19:43 David Henningsson [this message]
2011-11-29 20:03 ` Tests of the hda-jack branch Mark Brown
2011-11-30 6:41 ` Takashi Iwai
2011-11-30 9:26 ` Mark Brown
2011-11-29 20:51 ` Clemens Ladisch
2011-11-30 2:10 ` Raymond Yau
2011-11-30 6:38 ` Clemens Ladisch
2011-11-30 6:46 ` Takashi Iwai
2011-11-30 2:43 ` Raymond Yau
2011-11-30 8:05 ` David Henningsson
2011-11-30 6:31 ` Takashi Iwai
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=4ED535CA.1080108@canonical.com \
--to=david.henningsson@canonical.com \
--cc=alsa-devel@alsa-project.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.