From: Wu Fengguang <fengguang.wu@intel.com>
To: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.de>,
"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>
Subject: Re: [PATCH] hda: add IbexPeak/Clarkdale HDMI model with static cvt/pin number
Date: Sun, 2 Aug 2009 11:39:57 +0800 [thread overview]
Message-ID: <20090802033957.GA11657@localhost> (raw)
In-Reply-To: <alpine.LNX.2.00.0908011515340.21927@eeebox2.perex-int.cz>
On Sat, Aug 01, 2009 at 09:17:10PM +0800, Jaroslav Kysela wrote:
> On Sat, 1 Aug 2009, Wu Fengguang wrote:
>
> > -#define CVT_NID 0x02 /* audio converter */
> > -#define PIN_NID 0x03 /* HDMI output pin */
> > +static hda_nid_t cvt_nid; /* audio converter */
> > +static hda_nid_t pin_nid; /* HDMI output pin */
>
> I don't like to use static variables here. I would recommend to use a
> runtime structure to store these values.
Good idea. But let's keep this first step simple? I'll do the
conversion in subsequent patches. I'd like to add some hda_hdmi struct
into the hda_codec structure. Like this one. What do you think?
Thanks,
Fengguang
---
sound/pci/hda/hda_codec.h | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
--- sound-2.6.orig/sound/pci/hda/hda_codec.h
+++ sound-2.6/sound/pci/hda/hda_codec.h
@@ -555,6 +555,7 @@ static inline unsigned int snd_array_ind
struct hda_bus;
struct hda_beep;
+struct hda_hdmi;
struct hda_codec;
struct hda_pcm;
struct hda_pcm_stream;
@@ -788,6 +789,9 @@ struct hda_codec {
unsigned short spdif_ctls; /* SPDIF control bits */
unsigned int spdif_in_enable; /* SPDIF input enable? */
hda_nid_t *slave_dig_outs; /* optional digital out slave widgets */
+
+ struct hda_hdmi hdmi;
+
struct snd_array init_pins; /* initial (BIOS) pin configurations */
struct snd_array driver_pins; /* pin configs set by codec parser */
@@ -823,6 +827,23 @@ enum {
HDA_INPUT, HDA_OUTPUT
};
+/*
+ * The HDMI/DisplayPort configuration can be highly dynamic. A graphics device
+ * could support two independent pipes, each of them can be connected to one or
+ * more monitors (DVI, HDMI or DisplayPort).
+ *
+ * The HDA correspondence of pipes/monitors are converter/pin nodes.
+ */
+#define HDA_HDMI_CVTS 2
+#define HDA_HDMI_PINS 3
+struct hda_hdmi {
+ int num_cvts;
+ hda_nid_t cvt[HDA_HDMI_CVTS];
+ int num_pins;
+ hda_nid_t pin[HDA_HDMI_PINS];
+ /* the converter each pin connects to */
+ hda_nid_t pin_cvt[HDA_HDMI_PINS];
+};
/*
* constructors
next prev parent reply other threads:[~2009-08-02 3:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-01 12:27 [PATCH] hda: add IbexPeak/Clarkdale HDMI model with static cvt/pin number Wu Fengguang
2009-08-01 12:28 ` [PATCH] hda: auto switch active pin on HDMI hotplug events Wu Fengguang
2009-08-01 13:17 ` [PATCH] hda: add IbexPeak/Clarkdale HDMI model with static cvt/pin number Jaroslav Kysela
2009-08-02 3:39 ` Wu Fengguang [this message]
2009-08-02 8:48 ` [PATCH v2] " Wu Fengguang
2009-08-03 6:51 ` Takashi Iwai
2009-08-03 6:59 ` Wu Fengguang
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=20090802033957.GA11657@localhost \
--to=fengguang.wu@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=perex@perex.cz \
--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;
as well as URLs for NNTP newsgroup(s).