Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 342575
b: refs/heads/master
c: 3bef1c3
h: refs/heads/master
i:
  342573: e6f12db
  342571: 29fb74f
  342567: 978b4d6
  342559: a14ec5f
v: v3
  • Loading branch information
Laurence Darby authored and Takashi Iwai committed Nov 4, 2012
1 parent 8973e5d commit 5d33b1f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a5d00dc3a4b65ed38249f3225e453944c633747b
refs/heads/master: 3bef1c377d1bd8fd879ee5a66cf6f45ba16820cd
20 changes: 15 additions & 5 deletions trunk/sound/pci/hda/hda_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -4816,10 +4816,20 @@ EXPORT_SYMBOL_HDA(snd_hda_input_mux_put);
static void setup_dig_out_stream(struct hda_codec *codec, hda_nid_t nid,
unsigned int stream_tag, unsigned int format)
{
struct hda_spdif_out *spdif = snd_hda_spdif_out_of_nid(codec, nid);

/* turn off SPDIF once; otherwise the IEC958 bits won't be updated */
if (codec->spdif_status_reset && (spdif->ctls & AC_DIG1_ENABLE))
struct hda_spdif_out *spdif;
unsigned int curr_fmt;
bool reset;

spdif = snd_hda_spdif_out_of_nid(codec, nid);
curr_fmt = snd_hda_codec_read(codec, nid, 0,
AC_VERB_GET_STREAM_FORMAT, 0);
reset = codec->spdif_status_reset &&
(spdif->ctls & AC_DIG1_ENABLE) &&
curr_fmt != format;

/* turn off SPDIF if needed; otherwise the IEC958 bits won't be
updated */
if (reset)
set_dig_out_convert(codec, nid,
spdif->ctls & ~AC_DIG1_ENABLE & 0xff,
-1);
Expand All @@ -4831,7 +4841,7 @@ static void setup_dig_out_stream(struct hda_codec *codec, hda_nid_t nid,
format);
}
/* turn on again (if needed) */
if (codec->spdif_status_reset && (spdif->ctls & AC_DIG1_ENABLE))
if (reset)
set_dig_out_convert(codec, nid,
spdif->ctls & 0xff, -1);
}
Expand Down

0 comments on commit 5d33b1f

Please sign in to comment.