Lines Matching refs:substream
353 #define get_ichdev(substream) (substream->runtime->private_data) argument
360 struct snd_pcm_substream *substream; member
803 if (ack && ichdev->substream) { in snd_intel8x0_update()
804 snd_pcm_period_elapsed(ichdev->substream); in snd_intel8x0_update()
847 static int snd_intel8x0_pcm_trigger(struct snd_pcm_substream *substream, int cmd) in snd_intel8x0_pcm_trigger() argument
849 struct intel8x0 *chip = snd_pcm_substream_chip(substream); in snd_intel8x0_pcm_trigger()
850 struct ichdev *ichdev = get_ichdev(substream); in snd_intel8x0_pcm_trigger()
885 static int snd_intel8x0_ali_trigger(struct snd_pcm_substream *substream, int cmd) in snd_intel8x0_ali_trigger() argument
887 struct intel8x0 *chip = snd_pcm_substream_chip(substream); in snd_intel8x0_ali_trigger()
888 struct ichdev *ichdev = get_ichdev(substream); in snd_intel8x0_ali_trigger()
902 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in snd_intel8x0_ali_trigger()
940 static int snd_intel8x0_hw_params(struct snd_pcm_substream *substream, in snd_intel8x0_hw_params() argument
943 struct intel8x0 *chip = snd_pcm_substream_chip(substream); in snd_intel8x0_hw_params()
944 struct ichdev *ichdev = get_ichdev(substream); in snd_intel8x0_hw_params()
945 struct snd_pcm_runtime *runtime = substream->runtime; in snd_intel8x0_hw_params()
953 err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); in snd_intel8x0_hw_params()
979 static int snd_intel8x0_hw_free(struct snd_pcm_substream *substream) in snd_intel8x0_hw_free() argument
981 struct intel8x0 *chip = snd_pcm_substream_chip(substream); in snd_intel8x0_hw_free()
982 struct ichdev *ichdev = get_ichdev(substream); in snd_intel8x0_hw_free()
989 fill_nocache(substream->runtime->dma_area, substream->runtime->dma_bytes, 0); in snd_intel8x0_hw_free()
992 return snd_pcm_lib_free_pages(substream); in snd_intel8x0_hw_free()
1050 static int snd_intel8x0_pcm_prepare(struct snd_pcm_substream *substream) in snd_intel8x0_pcm_prepare() argument
1052 struct intel8x0 *chip = snd_pcm_substream_chip(substream); in snd_intel8x0_pcm_prepare()
1053 struct snd_pcm_runtime *runtime = substream->runtime; in snd_intel8x0_pcm_prepare()
1054 struct ichdev *ichdev = get_ichdev(substream); in snd_intel8x0_pcm_prepare()
1057 ichdev->size = snd_pcm_lib_buffer_bytes(substream); in snd_intel8x0_pcm_prepare()
1058 ichdev->fragsize = snd_pcm_lib_period_bytes(substream); in snd_intel8x0_pcm_prepare()
1068 static snd_pcm_uframes_t snd_intel8x0_pcm_pointer(struct snd_pcm_substream *substream) in snd_intel8x0_pcm_pointer() argument
1070 struct intel8x0 *chip = snd_pcm_substream_chip(substream); in snd_intel8x0_pcm_pointer()
1071 struct ichdev *ichdev = get_ichdev(substream); in snd_intel8x0_pcm_pointer()
1119 return bytes_to_frames(substream->runtime, ptr); in snd_intel8x0_pcm_pointer()
1173 static int snd_intel8x0_pcm_open(struct snd_pcm_substream *substream, struct ichdev *ichdev) in snd_intel8x0_pcm_open() argument
1175 struct intel8x0 *chip = snd_pcm_substream_chip(substream); in snd_intel8x0_pcm_open()
1176 struct snd_pcm_runtime *runtime = substream->runtime; in snd_intel8x0_pcm_open()
1179 ichdev->substream = substream; in snd_intel8x0_pcm_open()
1193 static int snd_intel8x0_playback_open(struct snd_pcm_substream *substream) in snd_intel8x0_playback_open() argument
1195 struct intel8x0 *chip = snd_pcm_substream_chip(substream); in snd_intel8x0_playback_open()
1196 struct snd_pcm_runtime *runtime = substream->runtime; in snd_intel8x0_playback_open()
1199 err = snd_intel8x0_pcm_open(substream, &chip->ichd[ICHD_PCMOUT]); in snd_intel8x0_playback_open()
1227 static int snd_intel8x0_playback_close(struct snd_pcm_substream *substream) in snd_intel8x0_playback_close() argument
1229 struct intel8x0 *chip = snd_pcm_substream_chip(substream); in snd_intel8x0_playback_close()
1231 chip->ichd[ICHD_PCMOUT].substream = NULL; in snd_intel8x0_playback_close()
1235 static int snd_intel8x0_capture_open(struct snd_pcm_substream *substream) in snd_intel8x0_capture_open() argument
1237 struct intel8x0 *chip = snd_pcm_substream_chip(substream); in snd_intel8x0_capture_open()
1239 return snd_intel8x0_pcm_open(substream, &chip->ichd[ICHD_PCMIN]); in snd_intel8x0_capture_open()
1242 static int snd_intel8x0_capture_close(struct snd_pcm_substream *substream) in snd_intel8x0_capture_close() argument
1244 struct intel8x0 *chip = snd_pcm_substream_chip(substream); in snd_intel8x0_capture_close()
1246 chip->ichd[ICHD_PCMIN].substream = NULL; in snd_intel8x0_capture_close()
1250 static int snd_intel8x0_mic_open(struct snd_pcm_substream *substream) in snd_intel8x0_mic_open() argument
1252 struct intel8x0 *chip = snd_pcm_substream_chip(substream); in snd_intel8x0_mic_open()
1254 return snd_intel8x0_pcm_open(substream, &chip->ichd[ICHD_MIC]); in snd_intel8x0_mic_open()
1257 static int snd_intel8x0_mic_close(struct snd_pcm_substream *substream) in snd_intel8x0_mic_close() argument
1259 struct intel8x0 *chip = snd_pcm_substream_chip(substream); in snd_intel8x0_mic_close()
1261 chip->ichd[ICHD_MIC].substream = NULL; in snd_intel8x0_mic_close()
1265 static int snd_intel8x0_mic2_open(struct snd_pcm_substream *substream) in snd_intel8x0_mic2_open() argument
1267 struct intel8x0 *chip = snd_pcm_substream_chip(substream); in snd_intel8x0_mic2_open()
1269 return snd_intel8x0_pcm_open(substream, &chip->ichd[ICHD_MIC2]); in snd_intel8x0_mic2_open()
1272 static int snd_intel8x0_mic2_close(struct snd_pcm_substream *substream) in snd_intel8x0_mic2_close() argument
1274 struct intel8x0 *chip = snd_pcm_substream_chip(substream); in snd_intel8x0_mic2_close()
1276 chip->ichd[ICHD_MIC2].substream = NULL; in snd_intel8x0_mic2_close()
1280 static int snd_intel8x0_capture2_open(struct snd_pcm_substream *substream) in snd_intel8x0_capture2_open() argument
1282 struct intel8x0 *chip = snd_pcm_substream_chip(substream); in snd_intel8x0_capture2_open()
1284 return snd_intel8x0_pcm_open(substream, &chip->ichd[ICHD_PCM2IN]); in snd_intel8x0_capture2_open()
1287 static int snd_intel8x0_capture2_close(struct snd_pcm_substream *substream) in snd_intel8x0_capture2_close() argument
1289 struct intel8x0 *chip = snd_pcm_substream_chip(substream); in snd_intel8x0_capture2_close()
1291 chip->ichd[ICHD_PCM2IN].substream = NULL; in snd_intel8x0_capture2_close()
1295 static int snd_intel8x0_spdif_open(struct snd_pcm_substream *substream) in snd_intel8x0_spdif_open() argument
1297 struct intel8x0 *chip = snd_pcm_substream_chip(substream); in snd_intel8x0_spdif_open()
1300 return snd_intel8x0_pcm_open(substream, &chip->ichd[idx]); in snd_intel8x0_spdif_open()
1303 static int snd_intel8x0_spdif_close(struct snd_pcm_substream *substream) in snd_intel8x0_spdif_close() argument
1305 struct intel8x0 *chip = snd_pcm_substream_chip(substream); in snd_intel8x0_spdif_close()
1308 chip->ichd[idx].substream = NULL; in snd_intel8x0_spdif_close()
1312 static int snd_intel8x0_ali_ac97spdifout_open(struct snd_pcm_substream *substream) in snd_intel8x0_ali_ac97spdifout_open() argument
1314 struct intel8x0 *chip = snd_pcm_substream_chip(substream); in snd_intel8x0_ali_ac97spdifout_open()
1324 return snd_intel8x0_pcm_open(substream, &chip->ichd[ALID_AC97SPDIFOUT]); in snd_intel8x0_ali_ac97spdifout_open()
1327 static int snd_intel8x0_ali_ac97spdifout_close(struct snd_pcm_substream *substream) in snd_intel8x0_ali_ac97spdifout_close() argument
1329 struct intel8x0 *chip = snd_pcm_substream_chip(substream); in snd_intel8x0_ali_ac97spdifout_close()
1332 chip->ichd[ALID_AC97SPDIFOUT].substream = NULL; in snd_intel8x0_ali_ac97spdifout_close()
1343 static int snd_intel8x0_ali_spdifin_open(struct snd_pcm_substream *substream)
1345 struct intel8x0 *chip = snd_pcm_substream_chip(substream);
1347 return snd_intel8x0_pcm_open(substream, &chip->ichd[ALID_SPDIFIN]);
1350 static int snd_intel8x0_ali_spdifin_close(struct snd_pcm_substream *substream)
1352 struct intel8x0 *chip = snd_pcm_substream_chip(substream);
1354 chip->ichd[ALID_SPDIFIN].substream = NULL;
1358 static int snd_intel8x0_ali_spdifout_open(struct snd_pcm_substream *substream)
1360 struct intel8x0 *chip = snd_pcm_substream_chip(substream);
1362 return snd_intel8x0_pcm_open(substream, &chip->ichd[ALID_SPDIFOUT]);
1365 static int snd_intel8x0_ali_spdifout_close(struct snd_pcm_substream *substream)
1367 struct intel8x0 *chip = snd_pcm_substream_chip(substream);
1369 chip->ichd[ALID_SPDIFOUT].substream = NULL;
2668 if (ichdev->substream && ichdev->page_attr_changed) { in intel8x0_suspend()
2669 struct snd_pcm_runtime *runtime = ichdev->substream->runtime; in intel8x0_suspend()
2726 if (ichdev->substream && ichdev->page_attr_changed) { in intel8x0_resume()
2727 struct snd_pcm_runtime *runtime = ichdev->substream->runtime; in intel8x0_resume()
2738 if (! ichdev->substream || ! ichdev->suspended) in intel8x0_resume()
2741 snd_intel8x0_setup_pcm_out(chip, ichdev->substream->runtime); in intel8x0_resume()
2773 subs = chip->pcm[0]->streams[0].substream; in intel8x0_measure_ac97_clock()
2782 ichdev->substream = NULL; /* don't process interrupts */ in intel8x0_measure_ac97_clock()