aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda
diff options
context:
space:
mode:
authorAnssi Hannula <anssi.hannula@iki.fi>2010-08-03 06:28:57 -0400
committerTakashi Iwai <tiwai@suse.de>2010-08-03 06:53:27 -0400
commit32c168c892e2c6936c714d1653ba5e19e07d5c26 (patch)
tree5d00d0d7b345da9285ea26be1787f0829b9eee3e /sound/pci/hda
parent68c18697910fdcacea36bd58d2d3d8febfa199a2 (diff)
ALSA: hda - Set Stream Type in Stream Format according to AES0
Set bit 15 (Stream Type) of HDA Stream Format to 1 (Non-PCM) when IEC958 channel status bit 1 (AES0 & 0x02) is set to 1 (non-audio). This is a prequisite for HDMI HBR passthrough. Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda')
-rw-r--r--sound/pci/hda/hda_codec.c6
-rw-r--r--sound/pci/hda/hda_codec.h3
-rw-r--r--sound/pci/hda/hda_intel.c3
3 files changed, 9 insertions, 3 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index d9d1c91dfd1b..bd8d7a63d7fe 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -3051,7 +3051,8 @@ static struct hda_rate_tbl rate_bits[] = {
3051unsigned int snd_hda_calc_stream_format(unsigned int rate, 3051unsigned int snd_hda_calc_stream_format(unsigned int rate,
3052 unsigned int channels, 3052 unsigned int channels,
3053 unsigned int format, 3053 unsigned int format,
3054 unsigned int maxbps) 3054 unsigned int maxbps,
3055 unsigned short spdif_ctls)
3055{ 3056{
3056 int i; 3057 int i;
3057 unsigned int val = 0; 3058 unsigned int val = 0;
@@ -3095,6 +3096,9 @@ unsigned int snd_hda_calc_stream_format(unsigned int rate,
3095 return 0; 3096 return 0;
3096 } 3097 }
3097 3098
3099 if (spdif_ctls & AC_DIG1_NONAUDIO)
3100 val |= 0x8000;
3101
3098 return val; 3102 return val;
3099} 3103}
3100EXPORT_SYMBOL_HDA(snd_hda_calc_stream_format); 3104EXPORT_SYMBOL_HDA(snd_hda_calc_stream_format);
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h
index 5991d14e1ec0..4797416aa3d9 100644
--- a/sound/pci/hda/hda_codec.h
+++ b/sound/pci/hda/hda_codec.h
@@ -928,7 +928,8 @@ void snd_hda_codec_cleanup_stream(struct hda_codec *codec, hda_nid_t nid);
928unsigned int snd_hda_calc_stream_format(unsigned int rate, 928unsigned int snd_hda_calc_stream_format(unsigned int rate,
929 unsigned int channels, 929 unsigned int channels,
930 unsigned int format, 930 unsigned int format,
931 unsigned int maxbps); 931 unsigned int maxbps,
932 unsigned short spdif_ctls);
932int snd_hda_is_supported_format(struct hda_codec *codec, hda_nid_t nid, 933int snd_hda_is_supported_format(struct hda_codec *codec, hda_nid_t nid,
933 unsigned int format); 934 unsigned int format);
934 935
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 1df25cf5ce38..f8a2f5aa4026 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -1653,7 +1653,8 @@ static int azx_pcm_prepare(struct snd_pcm_substream *substream)
1653 format_val = snd_hda_calc_stream_format(runtime->rate, 1653 format_val = snd_hda_calc_stream_format(runtime->rate,
1654 runtime->channels, 1654 runtime->channels,
1655 runtime->format, 1655 runtime->format,
1656 hinfo->maxbps); 1656 hinfo->maxbps,
1657 apcm->codec->spdif_ctls);
1657 if (!format_val) { 1658 if (!format_val) {
1658 snd_printk(KERN_ERR SFX 1659 snd_printk(KERN_ERR SFX
1659 "invalid format_val, rate=%d, ch=%d, format=%d\n", 1660 "invalid format_val, rate=%d, ch=%d, format=%d\n",