From b8e78b48a37c26998040b571ad3ecade12218461 Mon Sep 17 00:00:00 2001 From: Anssi Hannula Date: Tue, 3 Aug 2010 13:28:57 +0300 Subject: [PATCH] --- yaml --- r: 206487 b: refs/heads/master c: 32c168c892e2c6936c714d1653ba5e19e07d5c26 h: refs/heads/master i: 206485: e51a66e1adde7400a60690471cce6755ca7cf4ab 206483: 878e28e41d22168ec941216231bac272feff7500 206479: 567d6c0a97c00251614f06205a19b57a6e4aff58 v: v3 --- [refs] | 2 +- trunk/sound/pci/hda/hda_codec.c | 6 +++++- trunk/sound/pci/hda/hda_codec.h | 3 ++- trunk/sound/pci/hda/hda_intel.c | 3 ++- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 346d9754f063..a3b2096e94a4 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 68c18697910fdcacea36bd58d2d3d8febfa199a2 +refs/heads/master: 32c168c892e2c6936c714d1653ba5e19e07d5c26 diff --git a/trunk/sound/pci/hda/hda_codec.c b/trunk/sound/pci/hda/hda_codec.c index d9d1c91dfd1b..bd8d7a63d7fe 100644 --- a/trunk/sound/pci/hda/hda_codec.c +++ b/trunk/sound/pci/hda/hda_codec.c @@ -3051,7 +3051,8 @@ static struct hda_rate_tbl rate_bits[] = { unsigned int snd_hda_calc_stream_format(unsigned int rate, unsigned int channels, unsigned int format, - unsigned int maxbps) + unsigned int maxbps, + unsigned short spdif_ctls) { int i; unsigned int val = 0; @@ -3095,6 +3096,9 @@ unsigned int snd_hda_calc_stream_format(unsigned int rate, return 0; } + if (spdif_ctls & AC_DIG1_NONAUDIO) + val |= 0x8000; + return val; } EXPORT_SYMBOL_HDA(snd_hda_calc_stream_format); diff --git a/trunk/sound/pci/hda/hda_codec.h b/trunk/sound/pci/hda/hda_codec.h index 5991d14e1ec0..4797416aa3d9 100644 --- a/trunk/sound/pci/hda/hda_codec.h +++ b/trunk/sound/pci/hda/hda_codec.h @@ -928,7 +928,8 @@ void snd_hda_codec_cleanup_stream(struct hda_codec *codec, hda_nid_t nid); unsigned int snd_hda_calc_stream_format(unsigned int rate, unsigned int channels, unsigned int format, - unsigned int maxbps); + unsigned int maxbps, + unsigned short spdif_ctls); int snd_hda_is_supported_format(struct hda_codec *codec, hda_nid_t nid, unsigned int format); diff --git a/trunk/sound/pci/hda/hda_intel.c b/trunk/sound/pci/hda/hda_intel.c index 1df25cf5ce38..f8a2f5aa4026 100644 --- a/trunk/sound/pci/hda/hda_intel.c +++ b/trunk/sound/pci/hda/hda_intel.c @@ -1653,7 +1653,8 @@ static int azx_pcm_prepare(struct snd_pcm_substream *substream) format_val = snd_hda_calc_stream_format(runtime->rate, runtime->channels, runtime->format, - hinfo->maxbps); + hinfo->maxbps, + apcm->codec->spdif_ctls); if (!format_val) { snd_printk(KERN_ERR SFX "invalid format_val, rate=%d, ch=%d, format=%d\n",