diff options
author | Adrian Knoth <adi@drcomp.erfurt.thur.de> | 2013-07-05 05:28:09 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-07-05 08:52:04 -0400 |
commit | d3c36ed8e578185b752dac4277819965fa5f6879 (patch) | |
tree | 3f10c575acdb85c5ad6e43d4c4247fdbb3c34bad /sound/pci | |
parent | db2d1a913d838ecfab5b903508bcdd4e4ad42419 (diff) |
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: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/rme9652/hdspm.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c index 8e6ce1473333..b7702b225c3e 100644 --- a/sound/pci/rme9652/hdspm.c +++ b/sound/pci/rme9652/hdspm.c | |||
@@ -2224,6 +2224,23 @@ static int hdspm_get_sync_in_sample_rate(struct hdspm *hdspm) | |||
2224 | return 0; | 2224 | return 0; |
2225 | } | 2225 | } |
2226 | 2226 | ||
2227 | /** | ||
2228 | * Returns the AES sample rate class for the given card. | ||
2229 | **/ | ||
2230 | static int hdspm_get_aes_sample_rate(struct hdspm *hdspm, int index) | ||
2231 | { | ||
2232 | int timecode; | ||
2233 | |||
2234 | switch (hdspm->io_type) { | ||
2235 | case AES32: | ||
2236 | timecode = hdspm_read(hdspm, HDSPM_timecodeRegister); | ||
2237 | return (timecode >> (4*index)) & 0xF; | ||
2238 | break; | ||
2239 | default: | ||
2240 | break; | ||
2241 | } | ||
2242 | return 0; | ||
2243 | } | ||
2227 | 2244 | ||
2228 | /** | 2245 | /** |
2229 | * Returns the sample rate class for input source <idx> for | 2246 | * Returns the sample rate class for input source <idx> for |