Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 56159
b: refs/heads/master
c: a961f9f
h: refs/heads/master
i:
  56157: 2ee8334
  56155: 9eb761f
  56151: 615d924
  56143: ad8f039
  56127: 0403f3f
v: v3
  • Loading branch information
Takashi Iwai authored and Jaroslav Kysela committed May 11, 2007
1 parent 86bc617 commit 5efd8f8
Show file tree
Hide file tree
Showing 2 changed files with 9 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: bc9f98a9815c452a74e5eb9cbd2ed61b337fdcd2
refs/heads/master: a961f9fe8c6b0f3138a97582e1ddf05c4560593b
11 changes: 8 additions & 3 deletions trunk/sound/pci/hda/hda_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1368,6 +1368,11 @@ static struct hda_rate_tbl rate_bits[] = {
{ 96000, SNDRV_PCM_RATE_96000, 0x0800 }, /* 2 x 48 */
{ 176400, SNDRV_PCM_RATE_176400, 0x5800 },/* 4 x 44 */
{ 192000, SNDRV_PCM_RATE_192000, 0x1800 }, /* 4 x 48 */
#define AC_PAR_PCM_RATE_BITS 11
/* up to bits 10, 384kHZ isn't supported properly */

/* not autodetected value */
{ 9600, SNDRV_PCM_RATE_KNOT, 0x0400 }, /* 1/5 x 48 */

{ 0 } /* terminator */
};
Expand Down Expand Up @@ -1461,7 +1466,7 @@ int snd_hda_query_supported_pcm(struct hda_codec *codec, hda_nid_t nid,

if (ratesp) {
u32 rates = 0;
for (i = 0; rate_bits[i].hz; i++) {
for (i = 0; i < AC_PAR_PCM_RATE_BITS; i++) {
if (val & (1 << i))
rates |= rate_bits[i].alsa_bits;
}
Expand Down Expand Up @@ -1555,13 +1560,13 @@ int snd_hda_is_supported_format(struct hda_codec *codec, hda_nid_t nid,
}

rate = format & 0xff00;
for (i = 0; rate_bits[i].hz; i++)
for (i = 0; i < AC_PAR_PCM_RATE_BITS; i++)
if (rate_bits[i].hda_fmt == rate) {
if (val & (1 << i))
break;
return 0;
}
if (! rate_bits[i].hz)
if (i >= AC_PAR_PCM_RATE_BITS)
return 0;

stream = snd_hda_param_read(codec, nid, AC_PAR_STREAM);
Expand Down

0 comments on commit 5efd8f8

Please sign in to comment.