diff options
Diffstat (limited to 'sound/pci/ice1712/juli.c')
-rw-r--r-- | sound/pci/ice1712/juli.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sound/pci/ice1712/juli.c b/sound/pci/ice1712/juli.c index e8038c0ceb72..4550609b4d47 100644 --- a/sound/pci/ice1712/juli.c +++ b/sound/pci/ice1712/juli.c | |||
@@ -77,6 +77,22 @@ static unsigned char juli_ak4114_read(void *private_data, unsigned char reg) | |||
77 | return snd_vt1724_read_i2c((struct snd_ice1712 *)private_data, AK4114_ADDR, reg); | 77 | return snd_vt1724_read_i2c((struct snd_ice1712 *)private_data, AK4114_ADDR, reg); |
78 | } | 78 | } |
79 | 79 | ||
80 | static void juli_spdif_in_open(struct snd_ice1712 *ice, | ||
81 | struct snd_pcm_substream *substream) | ||
82 | { | ||
83 | struct juli_spec *spec = ice->spec; | ||
84 | struct snd_pcm_runtime *runtime = substream->runtime; | ||
85 | int rate; | ||
86 | |||
87 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) | ||
88 | return; | ||
89 | rate = snd_ak4114_external_rate(spec->ak4114); | ||
90 | if (rate >= runtime->hw.rate_min && rate <= runtime->hw.rate_max) { | ||
91 | runtime->hw.rate_min = rate; | ||
92 | runtime->hw.rate_max = rate; | ||
93 | } | ||
94 | } | ||
95 | |||
80 | /* | 96 | /* |
81 | * AK4358 section | 97 | * AK4358 section |
82 | */ | 98 | */ |
@@ -210,6 +226,7 @@ static int __devinit juli_init(struct snd_ice1712 *ice) | |||
210 | return err; | 226 | return err; |
211 | } | 227 | } |
212 | 228 | ||
229 | ice->spdif.ops.open = juli_spdif_in_open; | ||
213 | return 0; | 230 | return 0; |
214 | } | 231 | } |
215 | 232 | ||