提交 d3c36ed8 编写于 作者: A Adrian Knoth 提交者: Takashi Iwai

ALSA: hdspm - Introduce hdspm_get_aes_sample_rate()

Helper function to return the AES sample rate class. This class needs to
be translated via HDSPM_bit2freq() to get the more common
representation.
Signed-off-by: NAdrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 db2d1a91
......@@ -2224,6 +2224,23 @@ static int hdspm_get_sync_in_sample_rate(struct hdspm *hdspm)
return 0;
}
/**
* Returns the AES sample rate class for the given card.
**/
static int hdspm_get_aes_sample_rate(struct hdspm *hdspm, int index)
{
int timecode;
switch (hdspm->io_type) {
case AES32:
timecode = hdspm_read(hdspm, HDSPM_timecodeRegister);
return (timecode >> (4*index)) & 0xF;
break;
default:
break;
}
return 0;
}
/**
* Returns the sample rate class for input source <idx> for
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册