From 24004b9adee6fd9f1bff4f0b03274e1879980442 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 3 Jul 2009 23:03:30 +0200 Subject: [PATCH] --- yaml --- r: 154843 b: refs/heads/master c: 022b466fc353d3dc7a152451144be656248666ce h: refs/heads/master i: 154841: 8824463e9c6dacd99c188cb3e97157ef930cb487 154839: 8c1b8a9425e6958f36c43d2cfc3a11b60a4ace72 v: v3 --- [refs] | 2 +- trunk/sound/pci/hda/hda_codec.c | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 0ee0979c8c52..7a5bacb9e027 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: aa202455eec51699e44f658530728162cefa1307 +refs/heads/master: 022b466fc353d3dc7a152451144be656248666ce diff --git a/trunk/sound/pci/hda/hda_codec.c b/trunk/sound/pci/hda/hda_codec.c index 462e2cedaa6a..26d255de6beb 100644 --- a/trunk/sound/pci/hda/hda_codec.c +++ b/trunk/sound/pci/hda/hda_codec.c @@ -3470,10 +3470,16 @@ int snd_hda_multi_out_analog_open(struct hda_codec *codec, } mutex_lock(&codec->spdif_mutex); if (mout->share_spdif) { - runtime->hw.rates &= mout->spdif_rates; - runtime->hw.formats &= mout->spdif_formats; - if (mout->spdif_maxbps < hinfo->maxbps) - hinfo->maxbps = mout->spdif_maxbps; + if ((runtime->hw.rates & mout->spdif_rates) && + (runtime->hw.formats & mout->spdif_formats)) { + runtime->hw.rates &= mout->spdif_rates; + runtime->hw.formats &= mout->spdif_formats; + if (mout->spdif_maxbps < hinfo->maxbps) + hinfo->maxbps = mout->spdif_maxbps; + } else { + mout->share_spdif = 0; + /* FIXME: need notify? */ + } } mutex_unlock(&codec->spdif_mutex); }