aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_codec.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/hda/hda_codec.c')
-rw-r--r--sound/pci/hda/hda_codec.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 462e2cedaa6a..88480c0c58a0 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -332,6 +332,12 @@ int snd_hda_get_connections(struct hda_codec *codec, hda_nid_t nid,
332 AC_VERB_GET_CONNECT_LIST, i); 332 AC_VERB_GET_CONNECT_LIST, i);
333 range_val = !!(parm & (1 << (shift-1))); /* ranges */ 333 range_val = !!(parm & (1 << (shift-1))); /* ranges */
334 val = parm & mask; 334 val = parm & mask;
335 if (val == 0) {
336 snd_printk(KERN_WARNING "hda_codec: "
337 "invalid CONNECT_LIST verb %x[%i]:%x\n",
338 nid, i, parm);
339 return 0;
340 }
335 parm >>= shift; 341 parm >>= shift;
336 if (range_val) { 342 if (range_val) {
337 /* ranges between the previous and this one */ 343 /* ranges between the previous and this one */
@@ -3470,10 +3476,16 @@ int snd_hda_multi_out_analog_open(struct hda_codec *codec,
3470 } 3476 }
3471 mutex_lock(&codec->spdif_mutex); 3477 mutex_lock(&codec->spdif_mutex);
3472 if (mout->share_spdif) { 3478 if (mout->share_spdif) {
3473 runtime->hw.rates &= mout->spdif_rates; 3479 if ((runtime->hw.rates & mout->spdif_rates) &&
3474 runtime->hw.formats &= mout->spdif_formats; 3480 (runtime->hw.formats & mout->spdif_formats)) {
3475 if (mout->spdif_maxbps < hinfo->maxbps) 3481 runtime->hw.rates &= mout->spdif_rates;
3476 hinfo->maxbps = mout->spdif_maxbps; 3482 runtime->hw.formats &= mout->spdif_formats;
3483 if (mout->spdif_maxbps < hinfo->maxbps)
3484 hinfo->maxbps = mout->spdif_maxbps;
3485 } else {
3486 mout->share_spdif = 0;
3487 /* FIXME: need notify? */
3488 }
3477 } 3489 }
3478 mutex_unlock(&codec->spdif_mutex); 3490 mutex_unlock(&codec->spdif_mutex);
3479 } 3491 }