type
stringclasses
5 values
content
stringlengths
9
163k
structs
struct custom_prepare_struct { const char *sql; const char *extra; AST_DECLARE_STRING_FIELDS( AST_STRING_FIELD(encoding)[256]; ); va_list ap; unsigned long long skip; };
structs
struct update2_prepare_struct { const char *database; const char *table; va_list ap; };
structs
struct config_odbc_obj { char *sql; unsigned long cat_metric; char category[128]; char var_name[128]; char var_val[1024]; /* changed from 128 to 1024 via bug 8251 */ SQLLEN err; };
functions
void decode_chunk(char *chunk) { for (; *chunk; chunk++) { if (*chunk == '^' && strchr("0123456789ABCDEF", chunk[1]) && strchr("0123456789ABCDEF", chunk[2])) { sscanf(chunk + 1, "%02hhX", chunk); memmove(chunk + 1, chunk + 3, strlen(chunk + 3) + 1); }
functions
SQLHSTMT custom_prepare(struct odbc_obj *obj, void *data) { int res, x = 1, count = 0; struct custom_prepare_struct *cps = data; const char *newparam, *newval; char encodebuf[1024]; SQLHSTMT stmt; va_list ap; va_copy(ap, cps->ap); res = SQLAllocHandle(SQL_HANDLE_STMT, obj->con, &stmt); if ((res != SQL_SUCCES...
functions
int update_odbc(const char *database, const char *table, const char *keyfield, const char *lookup, va_list ap) { struct odbc_obj *obj; SQLHSTMT stmt; char sql[256]; SQLLEN rowcount=0; const char *newparam; int res, count = 1; va_list aq; struct custom_prepare_struct cps = { .sql = sql, .extra = lookup }
functions
SQLHSTMT update2_prepare(struct odbc_obj *obj, void *data) { int res, x = 1, first = 1; struct update2_prepare_struct *ups = data; const char *newparam, *newval; struct ast_str *sql = ast_str_thread_get(&sql_buf, 16); SQLHSTMT stmt; va_list ap; struct odbc_cache_tables *tableptr = ast_odbc_find_table(ups->databa...
functions
int update2_odbc(const char *database, const char *table, va_list ap) { struct odbc_obj *obj; SQLHSTMT stmt; struct update2_prepare_struct ups = { .database = database, .table = table, }
functions
int store_odbc(const char *database, const char *table, va_list ap) { struct odbc_obj *obj; SQLHSTMT stmt; char sql[256]; char keys[256]; char vals[256]; SQLLEN rowcount=0; const char *newparam; int res; va_list aq; struct custom_prepare_struct cps = { .sql = sql, .extra = NULL }
functions
int destroy_odbc(const char *database, const char *table, const char *keyfield, const char *lookup, va_list ap) { struct odbc_obj *obj; SQLHSTMT stmt; char sql[256]; SQLLEN rowcount=0; const char *newparam; int res; va_list aq; struct custom_prepare_struct cps = { .sql = sql, .extra = lookup }
functions
SQLHSTMT config_odbc_prepare(struct odbc_obj *obj, void *data) { struct config_odbc_obj *q = data; SQLHSTMT sth; int res; res = SQLAllocHandle(SQL_HANDLE_STMT, obj->con, &sth); if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) { ast_verb(4, "Failure in AllocStatement %d\n", res); return NULL; }
functions
int require_odbc(const char *database, const char *table, va_list ap) { struct odbc_cache_tables *tableptr = ast_odbc_find_table(database, table); struct odbc_cache_columns *col; char *elm; int type, size; if (!tableptr) { return -1; }
functions
int unload_module (void) { ast_config_engine_deregister(&odbc_engine); ast_verb(1, "res_config_odbc unloaded.\n"); return 0; }
functions
int load_module (void) { ast_config_engine_register(&odbc_engine); ast_verb(1, "res_config_odbc loaded.\n"); return 0; }
functions
int reload_module(void) { return 0; }
includes
#include <errno.h>
includes
#include <unistd.h>
includes
#include <hurd.h>
includes
#include <hurd/signal.h>
includes
#include <hurd/threadvar.h>
includes
#include <setjmp.h>
includes
#include <thread_state.h>
includes
#include <sysdep.h>
includes
#include <assert.h>
includes
#include <tls.h>
defines
#define LOSE do { assert_perror (err); goto lose; } while (0) /* XXX */
defines
#define XXX_KERNEL_PAGE_FAULT_BUG /* XXX work around page fault bug in mk */
defines
#define TASK_NOTIFY_PORT 2
functions
pid_t __fork (void) { jmp_buf env; pid_t pid; size_t i; error_t err; struct hurd_sigstate *volatile ss; RUN_HOOK (_hurd_atfork_prepare_hook, ()); ss = _hurd_self_sigstate (); __spin_lock (&ss->critical_section_lock); #undef LOSE if (! setjmp (env)) { process_t newproc; task_t newt...
functions
else if (portnames[i] == _hurd_ports[INIT_PORT_PROC].port) { /* Use the proc server port for the new task. */ insert = newproc; insert_type = MACH_MSG_TYPE_COPY_SEND; }
functions
else if (portnames[i] == ss->thread) { /* For the name we use for our own thread port, we will insert the thread port for the child main user thread after we create it. */ insert = MACH_PORT_NULL; record_refs = &thread_refs; /* Allocate a dead name right for this name as a placeh...
functions
STACK_GROWTH_UP if (__hurd_sigthread_stack_base == 0) { state.SP &= __hurd_threadvar_stack_mask; state.SP += __hurd_threadvar_stack_offset; }
functions
else if (__hurd_sigthread_stack_end == 0) { /* The signal thread has a stack assigned by cthreads. The threadvar_stack variables conveniently tell us how to get to the highest address in the stack, just below the per-thread variables. */ state.SP &= __hurd_threadvar_stack_mask; state....
includes
#include <linux/clk.h>
includes
#include <linux/gpio.h>
includes
#include <linux/of_gpio.h>
includes
#include <linux/platform_device.h>
includes
#include <linux/io.h>
includes
#include <linux/module.h>
includes
#include <linux/workqueue.h>
includes
#include <sound/core.h>
includes
#include <sound/soc.h>
includes
#include <sound/soc-dapm.h>
includes
#include <sound/pcm.h>
includes
#include <sound/jack.h>
includes
#include <sound/q6afe-v2.h>
includes
#include <sound/q6core.h>
includes
#include <sound/pcm_params.h>
includes
#include <sound/info.h>
includes
#include <soc/qcom/socinfo.h>
includes
#include <linux/input.h>
includes
#include <linux/delay.h>
defines
#define DRV_NAME "msm8952-slimbus-wcd"
defines
#define BTSCO_RATE_8KHZ 8000
defines
#define BTSCO_RATE_16KHZ 16000
defines
#define SAMPLING_RATE_8KHZ 8000
defines
#define SAMPLING_RATE_16KHZ 16000
defines
#define SAMPLING_RATE_32KHZ 32000
defines
#define SAMPLING_RATE_48KHZ 48000
defines
#define SAMPLING_RATE_96KHZ 96000
defines
#define SAMPLING_RATE_192KHZ 192000
defines
#define SAMPLING_RATE_44P1KHZ 44100
defines
#define MSM8952_SPK_ON 1
defines
#define MSM8952_SPK_OFF 0
defines
#define WCD9XXX_MBHC_DEF_BUTTONS 8
defines
#define WCD9XXX_MBHC_DEF_RLOADS 5
defines
#define CODEC_EXT_CLK_RATE 9600000
defines
#define PRI_MI2S_ID (1 << 0)
defines
#define SEC_MI2S_ID (1 << 1)
defines
#define TER_MI2S_ID (1 << 2)
defines
#define QUAT_MI2S_ID (1 << 3)
defines
#define QUIN_MI2S_ID (1 << 4)
defines
#define ADSP_STATE_READY_TIMEOUT_MS 50
defines
#define HS_STARTWORK_TIMEOUT 4000
defines
#define Q6AFE_LPASS_OSR_CLK_9_P600_MHZ 0x927C00
defines
#define MAX_AUX_CODECS 4
defines
#define WSA8810_NAME_1 "wsa881x.20170211"
defines
#define WSA8810_NAME_2 "wsa881x.20170212"
defines
#define S(X, Y) ((WCD_MBHC_CAL_PLUG_TYPE_PTR(tasha_wcd_cal)->X) = (Y))
defines
#define S(X, Y) ((WCD_MBHC_CAL_BTN_DET_PTR(tasha_wcd_cal)->X) = (Y))
defines
#define S(X, Y) ((WCD9XXX_MBHC_CAL_GENERAL_PTR(codec_cal)->X) = (Y))
defines
#define S(X, Y) ((WCD9XXX_MBHC_CAL_PLUG_DET_PTR(codec_cal)->X) = (Y))
defines
#define S(X, Y) ((WCD9XXX_MBHC_CAL_PLUG_TYPE_PTR(codec_cal)->X) = (Y))
defines
#define S(X, Y) ((WCD9XXX_MBHC_CAL_BTN_DET_PTR(codec_cal)->X) = (Y))
structs
struct msm8952_codec { void* (*get_afe_config_fn)(struct snd_soc_codec *codec, enum afe_config_type config_type); int (*mbhc_hs_detect)(struct snd_soc_codec *codec, struct wcd9xxx_mbhc_config *mbhc_cfg); };
structs
struct msm8952_pinctrl_info { struct pinctrl *pinctrl; struct pinctrl_state *gpio_state_active; struct pinctrl_state *gpio_state_suspend; uint8_t pinctrl_status; };
structs
struct msm8952_asoc_mach_data { int ext_pa; int us_euro_gpio; #if defined(CONFIG_SPEAKER_EXT_PA) int spk_ext_pa_gpio; struct msm8952_pinctrl_info spk_ext_pa_pinctrl_info; #endif struct delayed_work hs_detect_dwork; struct snd_soc_codec *codec; struct msm8952_codec msm8952_codec_fn; struct ext_intf_cfg clk_ref; ...
structs
struct msm895x_auxcodec_prefix_map { char codec_name[50]; char codec_prefix[25]; };
functions
int param_is_mask(int p) { return (p >= SNDRV_PCM_HW_PARAM_FIRST_MASK) && (p <= SNDRV_PCM_HW_PARAM_LAST_MASK); }
functions
int msm895x_wsa881x_init(struct snd_soc_dapm_context *dapm) { u8 spkleft_ports[WSA881X_MAX_SWR_PORTS] = {100, 101, 102, 106}
functions
void param_set_mask(struct snd_pcm_hw_params *p, int n, unsigned bit) { if (bit >= SNDRV_MASK_MAX) return; if (param_is_mask(n)) { struct snd_mask *m = param_to_mask(p, n); m->bits[0] = 0; m->bits[1] = 0; m->bits[bit >> 5] |= (1 << (bit & 31)); }
functions
void msm8952_ext_control(struct snd_soc_codec *codec) { struct snd_soc_dapm_context *dapm = &codec->dapm; mutex_lock(&dapm->codec->mutex); pr_debug("%s: msm8952_spk_control = %d", __func__, msm8952_spk_control); if (msm8952_spk_control == MSM8952_SPK_ON) { snd_soc_dapm_enable_pin(dapm, "Lineout_1 amp"); snd_so...
functions
int msm8952_get_spk(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { pr_debug("%s: msm8952_spk_control = %d\n", __func__, msm8952_spk_control); ucontrol->value.integer.value[0] = msm8952_spk_control; return 0; }
functions
int msm8952_set_spk(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); pr_debug("%s()\n", __func__); if (msm8952_spk_control == ucontrol->value.integer.value[0]) return 0; msm8952_spk_control = ucontrol->value.integer.value[0...
functions
int msm8952_enable_codec_mclk(struct snd_soc_codec *codec, int enable, bool dapm) { pr_debug("%s: enable = %d\n", __func__, enable); if (!strcmp(dev_name(codec->dev), "tomtom_codec")) tomtom_codec_mclk_enable(codec, enable, dapm); else if (!strcmp(dev_name(codec->dev), "tasha_codec")) tasha_cdc_mclk_enable...
functions
int slim5_rx_sample_rate_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { int sample_rate_val = 0; switch (slim5_rx_sample_rate) { case SAMPLING_RATE_44P1KHZ: sample_rate_val = 3; break; case SAMPLING_RATE_192KHZ: sample_rate_val = 2; break; case SAMPLING_RATE_96KHZ: sample_r...
functions
int slim5_rx_sample_rate_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { pr_debug("%s: ucontrol value = %ld\n", __func__, ucontrol->value.integer.value[0]); switch (ucontrol->value.integer.value[0]) { case 3: slim5_rx_sample_rate = SAMPLING_RATE_44P1KHZ; break; case 2: sl...
functions
int mi2s_rx_bit_format_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { switch (mi2s_rx_bit_format) { case SNDRV_PCM_FORMAT_S24_LE: ucontrol->value.integer.value[0] = 1; break; case SNDRV_PCM_FORMAT_S16_LE: default: ucontrol->value.integer.value[0] = 0; break; }
functions
int mi2s_rx_bit_format_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { switch (ucontrol->value.integer.value[0]) { case 1: mi2s_rx_bit_format = SNDRV_PCM_FORMAT_S24_LE; break; case 0: default: mi2s_rx_bit_format = SNDRV_PCM_FORMAT_S16_LE; break; }
functions
int slim0_rx_sample_rate_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { int sample_rate_val = 0; switch (slim0_rx_sample_rate) { case SAMPLING_RATE_44P1KHZ: sample_rate_val = 3; break; case SAMPLING_RATE_192KHZ: sample_rate_val = 2; break; case SAMPLING_RATE_96KHZ: sample_r...