Lines Matching refs:pcm_oss_file
58 static int snd_pcm_oss_get_rate(struct snd_pcm_oss_file *pcm_oss_file);
59 static int snd_pcm_oss_get_channels(struct snd_pcm_oss_file *pcm_oss_file);
60 static int snd_pcm_oss_get_format(struct snd_pcm_oss_file *pcm_oss_file);
1069 static int snd_pcm_oss_get_active_substream(struct snd_pcm_oss_file *pcm_oss_file, struct snd_pcm_substream **r_substream)
1075 substream = pcm_oss_file->streams[idx];
1503 static int snd_pcm_oss_reset(struct snd_pcm_oss_file *pcm_oss_file)
1510 substream = pcm_oss_file->streams[i];
1523 static int snd_pcm_oss_post(struct snd_pcm_oss_file *pcm_oss_file)
1528 substream = pcm_oss_file->streams[SNDRV_PCM_STREAM_PLAYBACK];
1585 static int snd_pcm_oss_sync(struct snd_pcm_oss_file *pcm_oss_file)
1595 substream = pcm_oss_file->streams[SNDRV_PCM_STREAM_PLAYBACK];
1675 substream = pcm_oss_file->streams[SNDRV_PCM_STREAM_CAPTURE];
1689 static int snd_pcm_oss_set_rate(struct snd_pcm_oss_file *pcm_oss_file, int rate)
1694 struct snd_pcm_substream *substream = pcm_oss_file->streams[idx];
1708 return snd_pcm_oss_get_rate(pcm_oss_file);
1711 static int snd_pcm_oss_get_rate(struct snd_pcm_oss_file *pcm_oss_file)
1716 if ((err = snd_pcm_oss_get_active_substream(pcm_oss_file, &substream)) < 0)
1721 static int snd_pcm_oss_set_channels(struct snd_pcm_oss_file *pcm_oss_file, unsigned int channels)
1729 struct snd_pcm_substream *substream = pcm_oss_file->streams[idx];
1739 return snd_pcm_oss_get_channels(pcm_oss_file);
1742 static int snd_pcm_oss_get_channels(struct snd_pcm_oss_file *pcm_oss_file)
1747 if ((err = snd_pcm_oss_get_active_substream(pcm_oss_file, &substream)) < 0)
1752 static int snd_pcm_oss_get_block_size(struct snd_pcm_oss_file *pcm_oss_file)
1757 if ((err = snd_pcm_oss_get_active_substream(pcm_oss_file, &substream)) < 0)
1762 static int snd_pcm_oss_get_formats(struct snd_pcm_oss_file *pcm_oss_file)
1772 if ((err = snd_pcm_oss_get_active_substream(pcm_oss_file, &substream)) < 0)
1805 static int snd_pcm_oss_set_format(struct snd_pcm_oss_file *pcm_oss_file, int format)
1810 formats = snd_pcm_oss_get_formats(pcm_oss_file);
1816 struct snd_pcm_substream *substream = pcm_oss_file->streams[idx];
1827 return snd_pcm_oss_get_format(pcm_oss_file);
1830 static int snd_pcm_oss_get_format(struct snd_pcm_oss_file *pcm_oss_file)
1835 if ((err = snd_pcm_oss_get_active_substream(pcm_oss_file, &substream)) < 0)
1863 static int snd_pcm_oss_set_subdivide(struct snd_pcm_oss_file *pcm_oss_file, int subdivide)
1868 struct snd_pcm_substream *substream = pcm_oss_file->streams[idx];
1896 static int snd_pcm_oss_set_fragment(struct snd_pcm_oss_file *pcm_oss_file, unsigned int val)
1901 struct snd_pcm_substream *substream = pcm_oss_file->streams[idx];
1935 static int snd_pcm_oss_get_caps(struct snd_pcm_oss_file *pcm_oss_file)
1941 struct snd_pcm_substream *substream = pcm_oss_file->streams[idx];
1958 static int snd_pcm_oss_set_trigger(struct snd_pcm_oss_file *pcm_oss_file, int trigger)
1968 psubstream = pcm_oss_file->streams[SNDRV_PCM_STREAM_PLAYBACK];
1969 csubstream = pcm_oss_file->streams[SNDRV_PCM_STREAM_CAPTURE];
2027 static int snd_pcm_oss_get_trigger(struct snd_pcm_oss_file *pcm_oss_file)
2032 psubstream = pcm_oss_file->streams[SNDRV_PCM_STREAM_PLAYBACK];
2033 csubstream = pcm_oss_file->streams[SNDRV_PCM_STREAM_CAPTURE];
2041 static int snd_pcm_oss_get_odelay(struct snd_pcm_oss_file *pcm_oss_file)
2048 substream = pcm_oss_file->streams[SNDRV_PCM_STREAM_PLAYBACK];
2064 static int snd_pcm_oss_get_ptr(struct snd_pcm_oss_file *pcm_oss_file, int stream, struct count_info __user * _info)
2075 substream = pcm_oss_file->streams[stream];
2133 static int snd_pcm_oss_get_space(struct snd_pcm_oss_file *pcm_oss_file, int stream, struct audio_buf_info __user *_info)
2144 substream = pcm_oss_file->streams[stream];
2194 static int snd_pcm_oss_get_mapbuf(struct snd_pcm_oss_file *pcm_oss_file, int stream, struct buffmem_desc __user * _info)
2277 static int snd_pcm_oss_release_file(struct snd_pcm_oss_file *pcm_oss_file)
2280 if (!pcm_oss_file)
2283 struct snd_pcm_substream *substream = pcm_oss_file->streams[cidx];
2287 kfree(pcm_oss_file);
2298 struct snd_pcm_oss_file *pcm_oss_file;
2305 pcm_oss_file = kzalloc(sizeof(*pcm_oss_file), GFP_KERNEL);
2306 if (pcm_oss_file == NULL)
2328 snd_pcm_oss_release_file(pcm_oss_file);
2332 pcm_oss_file->streams[idx] = substream;
2333 substream->file = pcm_oss_file;
2337 if (!pcm_oss_file->streams[0] && !pcm_oss_file->streams[1]) {
2338 snd_pcm_oss_release_file(pcm_oss_file);
2342 file->private_data = pcm_oss_file;
2344 *rpcm_oss_file = pcm_oss_file;
2366 struct snd_pcm_oss_file *pcm_oss_file;
2408 err = snd_pcm_oss_open_file(file, pcm, &pcm_oss_file,
2446 struct snd_pcm_oss_file *pcm_oss_file;
2448 pcm_oss_file = file->private_data;
2449 substream = pcm_oss_file->streams[SNDRV_PCM_STREAM_PLAYBACK];
2451 substream = pcm_oss_file->streams[SNDRV_PCM_STREAM_CAPTURE];
2456 snd_pcm_oss_sync(pcm_oss_file);
2458 snd_pcm_oss_release_file(pcm_oss_file);
2468 struct snd_pcm_oss_file *pcm_oss_file;
2472 pcm_oss_file = file->private_data;
2483 substream = pcm_oss_file->streams[idx];
2499 return snd_pcm_oss_reset(pcm_oss_file);
2501 return snd_pcm_oss_sync(pcm_oss_file);
2505 if ((res = snd_pcm_oss_set_rate(pcm_oss_file, res))<0)
2509 res = snd_pcm_oss_get_rate(pcm_oss_file);
2517 if ((res = snd_pcm_oss_set_channels(pcm_oss_file, res)) < 0)
2521 res = snd_pcm_oss_get_block_size(pcm_oss_file);
2528 res = snd_pcm_oss_set_format(pcm_oss_file, res);
2533 res = snd_pcm_oss_get_format(pcm_oss_file);
2540 res = snd_pcm_oss_set_channels(pcm_oss_file, res);
2545 res = snd_pcm_oss_get_channels(pcm_oss_file);
2553 return snd_pcm_oss_post(pcm_oss_file);
2557 res = snd_pcm_oss_set_subdivide(pcm_oss_file, res);
2564 return snd_pcm_oss_set_fragment(pcm_oss_file, res);
2566 res = snd_pcm_oss_get_formats(pcm_oss_file);
2572 return snd_pcm_oss_get_space(pcm_oss_file,
2579 res = snd_pcm_oss_get_caps(pcm_oss_file);
2584 res = snd_pcm_oss_get_trigger(pcm_oss_file);
2591 return snd_pcm_oss_set_trigger(pcm_oss_file, res);
2594 return snd_pcm_oss_get_ptr(pcm_oss_file,
2600 return snd_pcm_oss_get_mapbuf(pcm_oss_file,
2608 if (snd_pcm_oss_get_caps(pcm_oss_file) & DSP_CAP_DUPLEX)
2612 res = snd_pcm_oss_get_odelay(pcm_oss_file);
2636 struct snd_pcm_oss_file *pcm_oss_file;
2639 pcm_oss_file = file->private_data;
2640 substream = pcm_oss_file->streams[SNDRV_PCM_STREAM_CAPTURE];
2658 struct snd_pcm_oss_file *pcm_oss_file;
2662 pcm_oss_file = file->private_data;
2663 substream = pcm_oss_file->streams[SNDRV_PCM_STREAM_PLAYBACK];
2699 struct snd_pcm_oss_file *pcm_oss_file;
2703 pcm_oss_file = file->private_data;
2705 psubstream = pcm_oss_file->streams[SNDRV_PCM_STREAM_PLAYBACK];
2706 csubstream = pcm_oss_file->streams[SNDRV_PCM_STREAM_CAPTURE];
2731 ofile.streams[SNDRV_PCM_STREAM_CAPTURE] = pcm_oss_file->streams[SNDRV_PCM_STREAM_CAPTURE];
2742 struct snd_pcm_oss_file *pcm_oss_file;
2750 pcm_oss_file = file->private_data;
2753 substream = pcm_oss_file->streams[SNDRV_PCM_STREAM_PLAYBACK];
2758 substream = pcm_oss_file->streams[SNDRV_PCM_STREAM_CAPTURE];
2761 substream = pcm_oss_file->streams[SNDRV_PCM_STREAM_PLAYBACK];