From: Nitin Daga <ndaga@nvidia.com>
To: alsa-devel@alsa-project.org
Cc: Nitin Daga <ndaga@nvidia.com>
Subject: [PATCH] ALSA: hda: Disable odd numbered channels on HDMI controllers.
Date: Fri, 14 Jan 2011 01:49:47 +0530 [thread overview]
Message-ID: <1294949987-11389-1-git-send-email-ndaga@nvidia.com> (raw)
Added code in hda_intel.c to disable odd numbered channels
not supported by HDMI controllers.
Signed-off-by: Nitin Daga <ndaga@nvidia.com>
Acked-By: Stephen Warren <swarren@nvidia.com>
---
pci/hda/hda_intel.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/pci/hda/hda_intel.c b/pci/hda/hda_intel.c
index a78ea34..293c685 100644
--- a/pci/hda/hda_intel.c
+++ b/pci/hda/hda_intel.c
@@ -1539,6 +1539,16 @@ struct azx_pcm {
struct hda_pcm_stream *hinfo[2];
};
+static unsigned int channels_2_4_6_8[] = {
+ 2, 4, 6, 8
+};
+
+static struct snd_pcm_hw_constraint_list hw_constraints_2_4_6_8_channels = {
+ .count = ARRAY_SIZE(channels_2_4_6_8),
+ .list = channels_2_4_6_8,
+ .mask = 0,
+};
+
static int azx_pcm_open(struct snd_pcm_substream *substream)
{
struct azx_pcm *apcm = snd_pcm_substream_chip(substream);
@@ -1566,6 +1576,9 @@ static int azx_pcm_open(struct snd_pcm_substream *substream)
128);
snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES,
128);
+ snd_pcm_hw_constraint_list(runtime, 0,
+ SNDRV_PCM_HW_PARAM_CHANNELS,
+ &hw_constraints_2_4_6_8_channels);
snd_hda_power_up(apcm->codec);
err = hinfo->ops.open(hinfo, apcm->codec, substream);
if (err < 0) {
--
1.7.0.4
-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information. Any unauthorized review, use, disclosure or distribution
is prohibited. If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
next reply other threads:[~2011-01-13 20:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-13 20:19 Nitin Daga [this message]
2011-01-13 20:42 ` [PATCH] ALSA: hda: Disable odd numbered channels on HDMI controllers Anssi Hannula
2011-01-14 8:49 ` Takashi Iwai
2011-01-14 9:14 ` Anssi Hannula
2011-01-14 9:37 ` 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=1294949987-11389-1-git-send-email-ndaga@nvidia.com \
--to=ndaga@nvidia.com \
--cc=alsa-devel@alsa-project.org \
/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.