Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 206487
b: refs/heads/master
c: 32c168c
h: refs/heads/master
i:
  206485: e51a66e
  206483: 878e28e
  206479: 567d6c0
v: v3
  • Loading branch information
Anssi Hannula authored and Takashi Iwai committed Aug 3, 2010
1 parent 26d490e commit b8e78b4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 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: 68c18697910fdcacea36bd58d2d3d8febfa199a2
refs/heads/master: 32c168c892e2c6936c714d1653ba5e19e07d5c26
6 changes: 5 additions & 1 deletion trunk/sound/pci/hda/hda_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion trunk/sound/pci/hda/hda_codec.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
3 changes: 2 additions & 1 deletion trunk/sound/pci/hda/hda_intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit b8e78b4

Please sign in to comment.