type
stringclasses
5 values
content
stringlengths
9
163k
functions
void Auddrv_I2S1GpioReset(void) { #ifdef CONFIG_MTK_EXT_DAC #ifdef CONFIG_OF int ret; ret = GetGPIO_Info(6, &pin_i2s1clk, &pin_mode_i2s1clk); if (ret < 0) { printk("Auddrv_I2S1GpioReset GetGPIO_Info FAIL1!!! \n"); return; }
functions
int AudioDebug_Setting_Get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { printk("%s()\n", __func__); return 0; }
functions
int AudioI2S1_Setting_Set(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { printk("%s()\n", __func__); if (ucontrol->value.enumerated.item[0] > ARRAY_SIZE(Audio_I2S1_Setting)) { printk("return -EINVAL\n"); return -EINVAL; }
functions
int AudioI2S1_Setting_Get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { printk("%s()\n", __func__); ucontrol->value.enumerated.item[0] = AudioI2S1Setting; return 0; }
functions
int Audio_ModemPcm_ASRC_Set(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { printk("+%s()\n", __func__); if (ucontrol->value.enumerated.item[0] > ARRAY_SIZE(InterModemPcm_ASRC_Switch)) { printk("return -EINVAL\n"); return -EINVAL; }
functions
int Audio_Ipoh_Setting_Get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { printk("%s()\n", __func__); ucontrol->value.integer.value[0] = AudDrvSuspend_ipoh_Status; return 0; }
functions
int Audio_Ipoh_Setting_Set(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { printk("+%s()\n", __func__); if (ucontrol->value.enumerated.item[0] > ARRAY_SIZE(Audio_IPOH_State)) { printk("return -EINVAL\n"); return -EINVAL; }
functions
int Audio_Mode_Get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { printk("Audio_SideTone_Get = %d\n", mAudio_Mode); ucontrol->value.integer.value[0] = mAudio_Mode; return 0; }
functions
int Audio_Mode_Set(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { printk("%s()\n", __func__); if (ucontrol->value.enumerated.item[0] > ARRAY_SIZE(ANDROID_AUDIO_MODE)) { printk("return -EINVAL\n"); return -EINVAL; }
functions
int Audio_Irqcnt1_Get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { printk("Audio_Irqcnt1_Get \n"); AudDrv_Clk_On(); ucontrol->value.integer.value[0] = Afe_Get_Reg(AFE_IRQ_MCU_CNT1); AudDrv_Clk_Off(); return 0; }
functions
int Audio_Irqcnt1_Set(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { uint32 irq1_cnt = ucontrol->value.integer.value[0]; printk("%s()\n", __func__); AudDrv_Clk_On(); Afe_Set_Reg(AFE_IRQ_MCU_CNT1, irq1_cnt, 0xffffffff); AudDrv_Clk_Off(); return 0; }
functions
int Audio_Irqcnt2_Get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { printk("Audio_Irqcnt2_Get \n"); AudDrv_Clk_On(); ucontrol->value.integer.value[0] = Afe_Get_Reg(AFE_IRQ_MCU_CNT2); AudDrv_Clk_Off(); return 0; }
functions
int Audio_Irqcnt2_Set(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { uint32 irq1_cnt = ucontrol->value.integer.value[0]; printk("%s()\n", __func__); AudDrv_Clk_On(); Afe_Set_Reg(AFE_IRQ_MCU_CNT2, irq1_cnt, 0xffffffff); AudDrv_Clk_Off(); return 0; }
functions
void GetAudioTrimOffset(int channels) { int Buffer_on_value = 0 , Buffer_offl_value = 0, Buffer_offr_value = 0; const int off_counter = 20, on_counter = 20 , Const_DC_OFFSET = 0;//2048; printk("%s channels = %d\n", __func__, channels); // open headphone and digital part AudDrv_Clk_On(); AudDrv_...
functions
int Audio_Hpl_Offset_Get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { #ifndef EFUSE_HP_TRIM printk("%s \n", __func__); AudDrv_Clk_On(); if (mHplCalibrated == false) { GetAudioTrimOffset(AUDIO_OFFSET_TRIM_MUX_HPL); SetHprTrimOffset(...
functions
int Audio_Hpl_Offset_Set(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { #ifndef EFUSE_HP_TRIM printk("%s()\n", __func__); mHplOffset = ucontrol->value.integer.value[0]; SetHplTrimOffset(mHplOffset); #else mHplOffset = ucontrol->value.integer.value[0]; #endif return 0; }
functions
int Audio_Hpr_Offset_Get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { #ifndef EFUSE_HP_TRIM printk("%s \n", __func__); AudDrv_Clk_On(); if (mHprCalibrated == false) { GetAudioTrimOffset(AUDIO_OFFSET_TRIM_MUX_HPR); SetHprTrimOffset(...
functions
int Audio_Hpr_Offset_Set(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { #ifndef EFUSE_HP_TRIM printk("%s()\n", __func__); mHprOffset = ucontrol->value.integer.value[0]; SetHprTrimOffset(mHprOffset); #else mHprOffset = ucontrol->value.integer.value[0]; #endif return 0; }
functions
void EnAble_Anc_Path(int state) { printk("%s not supported!!!\n ", __func__); }
functions
int Afe_Anc_Get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { printk("%s()\n", __func__); ucontrol->value.integer.value[0] = m_Anc_State; return 0; }
functions
int Afe_Anc_Set(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { printk("%s()\n", __func__); EnAble_Anc_Path(ucontrol->value.integer.value[0]); m_Anc_State = ucontrol->value.integer.value[0]; return 0; }
functions
int mtk_routing_pcm_open(struct snd_pcm_substream *substream) { struct snd_pcm_runtime *runtime = substream->runtime; int err = 0; int ret = 0; printk("mtk_routing_pcm_open\n"); ret = snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, &constraints_s...
functions
int mtk_routing_pcm_close(struct snd_pcm_substream *substream) { return 0; }
functions
int mtk_routing_pcm_trigger(struct snd_pcm_substream *substream, int cmd) { printk("%s cmd = %d\n", __func__, cmd); switch (cmd) { case SNDRV_PCM_TRIGGER_START: case SNDRV_PCM_TRIGGER_RESUME: case SNDRV_PCM_TRIGGER_STOP: case SNDRV_PCM_TRIGGER_SUSPEND: break; ...
functions
int mtk_routing_pcm_copy(struct snd_pcm_substream *substream, int channel, snd_pcm_uframes_t pos, void __user *dst, snd_pcm_uframes_t count) { count = count << 2; return 0; }
functions
int mtk_routing_pcm_silence(struct snd_pcm_substream *substream, int channel, snd_pcm_uframes_t pos, snd_pcm_uframes_t count) { printk("mtk_routing_pcm_silence \n"); return 0; /* do nothing */ }
functions
int mtk_routing_pcm_prepare(struct snd_pcm_substream *substream) { printk("mtk_alsa_prepare \n"); return 0; }
functions
int mtk_routing_pcm_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *hw_params) { int ret = 0; PRINTK_AUDDRV("mtk_routing_pcm_hw_params \n"); return ret; }
functions
int mtk_routing_pcm_hw_free(struct snd_pcm_substream *substream) { PRINTK_AUDDRV("mtk_routing_pcm_hw_free \n"); return snd_pcm_lib_free_pages(substream); }
functions
int mtk_afe_routing_probe(struct platform_device *pdev) { printk("mtk_afe_routing_probe\n"); pdev->dev.coherent_dma_mask = DMA_BIT_MASK(64); if (!pdev->dev.dma_mask) { pdev->dev.dma_mask = &pdev->dev.coherent_dma_mask; }
functions
int mtk_asoc_routing_pcm_new(struct snd_soc_pcm_runtime *rtd) { int ret = 0; pruntimepcm = rtd; printk("%s\n", __func__); return ret; }
functions
int mtk_afe_routing_platform_probe(struct snd_soc_platform *platform) { printk("mtk_afe_routing_platform_probe\n"); //add controls snd_soc_add_platform_controls(platform, Audio_snd_routing_controls, ARRAY_SIZE(Audio_snd_routing_controls)); snd_soc_add_platform_control...
functions
int mtk_afe_routing_remove(struct platform_device *pdev) { pr_debug("%s\n", __func__); snd_soc_unregister_platform(&pdev->dev); return 0; }
functions
int mtk_routing_pm_ops_suspend(struct device *device) { printk("%s \n", __func__); if (get_voice_status() == true) { return 0; }
functions
int mtk_pm_ops_suspend_ipo(struct device *device) { printk("%s", __func__); AudDrvSuspend_ipoh_Status = true; return mtk_routing_pm_ops_suspend(device); }
functions
int mtk_routing_pm_ops_resume(struct device *device) { printk("%s \n ", __func__); if (AudDrvSuspendStatus == true) { AudDrv_Suspend_Clk_On(); if(ConditionEnterSuspend() == true) { Restore_Audio_Register(); SetAnalogSuspend(false); }
functions
int mtk_pm_ops_resume_ipo(struct device *device) { printk("%s", __func__); return mtk_routing_pm_ops_resume(device); }
functions
__init mtk_soc_routing_platform_init(void) { int ret = 0; printk("%s\n", __func__); #ifndef CONFIG_OF soc_mtkafe_routing_dev = platform_device_alloc(MT_SOC_ROUTING_PCM , -1); if (!soc_mtkafe_routing_dev) { return -ENOMEM; }
functions
__exit mtk_soc_routing_platform_exit(void) { printk("%s\n", __func__); platform_driver_unregister(&mtk_afe_routing_driver); }
includes
#include <linux/slab.h>
includes
#include <linux/kernel.h>
includes
#include <linux/device.h>
includes
#include <linux/etherdevice.h>
includes
#include <linux/atomic.h>
defines
#define LOG2_STATUS_INTERVAL_MSEC 5 /* 1 << 5 == 32 msec */
defines
#define STATUS_BYTECOUNT 8 /* 8 bytes data */
structs
struct f_rndis { struct gether port; u8 ctrl_id, data_id; u8 ethaddr[ETH_ALEN]; u32 vendorID; const char *manufacturer; int config; struct usb_ep *notify; struct usb_request *notify_req; atomic_t notify_count; };
functions
int bitrate(struct usb_gadget *g) { if (gadget_is_superspeed(g) && g->speed == USB_SPEED_SUPER) return 13 * 1024 * 8 * 1000 * 8; else if (gadget_is_dualspeed(g) && g->speed == USB_SPEED_HIGH) return 13 * 512 * 8 * 1000 * 8; else return 19 * 64 * 1 * 1000 * 8; }
functions
void rndis_response_available(void *_rndis) { struct f_rndis *rndis = _rndis; struct usb_request *req = rndis->notify_req; struct usb_composite_dev *cdev = rndis->port.func.config->cdev; __le32 *data = req->buf; int status; if (atomic_inc_return(&rndis->notify_count) != 1) return; /* Send RNDIS RESP...
functions
void rndis_response_complete(struct usb_ep *ep, struct usb_request *req) { struct f_rndis *rndis = req->context; struct usb_composite_dev *cdev; int status = req->status; if (!rndis->port.func.config || !rndis->port.func.config->cdev) return; else cdev = rndis->port.func.config->cdev; /* after TX: * ...
functions
void rndis_command_complete(struct usb_ep *ep, struct usb_request *req) { struct f_rndis *rndis = req->context; struct usb_composite_dev *cdev; int status; rndis_init_msg_type *buf; if (!rndis->port.func.config || !rndis->port.func.config->cdev) return; else cdev = rndis->port.func.config->cdev; /* r...
functions
int rndis_setup(struct usb_function *f, const struct usb_ctrlrequest *ctrl) { struct f_rndis *rndis = func_to_rndis(f); struct usb_composite_dev *cdev = f->config->cdev; struct usb_request *req = cdev->req; int value = -EOPNOTSUPP; u16 w_index = le16_to_cpu(ctrl->wIndex); u16 w_value = le16_to_cpu(ctrl->wV...
functions
int rndis_set_alt(struct usb_function *f, unsigned intf, unsigned alt) { struct f_rndis *rndis = func_to_rndis(f); struct usb_composite_dev *cdev = f->config->cdev; /* we know alt == 0 */ if (intf == rndis->ctrl_id) { if (rndis->notify->driver_data) { VDBG(cdev, "reset rndis control %d\n", intf); usb_ep_...
functions
else if (intf == rndis->data_id) { struct net_device *net; if (rndis->port.in_ep->driver_data) { DBG(cdev, "reset rndis\n"); gether_disconnect(&rndis->port); }
functions
void rndis_disable(struct usb_function *f) { struct f_rndis *rndis = func_to_rndis(f); struct usb_composite_dev *cdev = f->config->cdev; if (!rndis->notify->driver_data) return; DBG(cdev, "rndis deactivated\n"); rndis_uninit(rndis->config); gether_disconnect(&rndis->port); usb_ep_disable(rndis->notify); ...
functions
void rndis_open(struct gether *geth) { struct f_rndis *rndis = func_to_rndis(&geth->func); struct usb_composite_dev *cdev = geth->func.config->cdev; DBG(cdev, "%s\n", __func__); rndis_set_param_medium(rndis->config, NDIS_MEDIUM_802_3, bitrate(cdev->gadget) / 100); rndis_signal_connect(rndis->config); }
functions
void rndis_close(struct gether *geth) { struct f_rndis *rndis = func_to_rndis(&geth->func); DBG(geth->func.config->cdev, "%s\n", __func__); rndis_set_param_medium(rndis->config, NDIS_MEDIUM_802_3, 0); rndis_signal_disconnect(rndis->config); }
functions
int rndis_bind(struct usb_configuration *c, struct usb_function *f) { struct usb_composite_dev *cdev = c->cdev; struct f_rndis *rndis = func_to_rndis(f); int status; struct usb_ep *ep; /* allocate instance-specific interface IDs */ status = usb_interface_id(c, f); if (status < 0) goto fail; rndis->ctrl_i...
functions
void rndis_unbind(struct usb_configuration *c, struct usb_function *f) { struct f_rndis *rndis = func_to_rndis(f); rndis_deregister(rndis->config); rndis_exit(); if (gadget_is_superspeed(c->cdev->gadget)) usb_free_descriptors(f->ss_descriptors); if (gadget_is_dualspeed(c->cdev->gadget)) usb_free_descriptors...
functions
bool can_support_rndis(struct usb_configuration *c) { /* everything else is *presumably* fine */ return true; }
functions
int rndis_bind_config(struct usb_configuration *c, u8 ethaddr[ETH_ALEN]) { return rndis_bind_config_vendor(c, ethaddr, 0, NULL); }
functions
int rndis_bind_config_vendor(struct usb_configuration *c, u8 ethaddr[ETH_ALEN], u32 vendorID, const char *manufacturer) { struct f_rndis *rndis; int status; if (!can_support_rndis(c) || !ethaddr) return -EINVAL; /* setup RNDIS itself */ status = rndis_init(); if (status < 0) return status; /* maybe a...
includes
#include <sys/types.h>
includes
#include <limits.h>
includes
#include <stdarg.h>
includes
#include <stdio.h>
includes
#include <stdlib.h>
includes
#include <string.h>
includes
#include <unistd.h>
includes
#include <security/pam_appl.h>
functions
void set_methods(const char *strategy, int *methods, int max_methods, int try_v5_2b_only, int try_rxk5_only) { int i = 0, j; struct { const char *name; int method; }
main
int main(int argc, char **argv) { char local[PATH_MAX], home[PATH_MAX], path[PATH_MAX]; char *homedir, *cell, *principal, *pathdir, *strategy; int i, j, try_v5_2b_only, try_rxk5_only, cells, process_options; int methods[8]; krb5_context ctx; krb5_ccache ccache; uid_t uid; /* Iterate through every parameter, as...
includes
#include <linux/config.h>
includes
#include <linux/kernel.h>
includes
#include <linux/sched.h>
includes
#include <linux/init.h>
includes
#include <linux/interrupt.h>
includes
#include <asm/system.h>
includes
#include <asm/leds.h>
includes
#include <asm/mach-types.h>
includes
#include <asm/io.h>
includes
#include <asm/irq.h>
includes
#include <asm/arch/map.h>
includes
#include <asm/arch/regs-timer.h>
includes
#include <asm/arch/regs-irq.h>
includes
#include <asm/mach/time.h>
defines
#define SRCPND_TIMER4 (1<<(IRQ_TIMER4 - IRQ_EINT0))
functions
long s3c2410_gettimeoffset (void) { unsigned long tdone; unsigned long usec; unsigned long irqpend; /* work out how many ticks have gone since last timer interrupt */ tdone = timer_startval - __raw_readl(S3C2410_TCNTO(4)); /* check to see if there is an interrupt pending */ irqpend = __raw_readl(S3C2410_SRCP...
functions
irqreturn_t s3c2410_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) { timer_tick(regs); return IRQ_HANDLED; }
functions
__init s3c2410_init_time (void) { unsigned long tcon; unsigned long tcnt; unsigned long tcfg1; unsigned long tcfg0; gettimeoffset = s3c2410_gettimeoffset; tcnt = 0xffff; /* default value for tcnt */ /* read the current timer configuration bits */ tcon = __raw_readl(S3C2410_TCON); tcfg1 = __raw_readl(S3C24...
includes
#include <stdio.h>
includes
#include <stdlib.h>
includes
#include <string.h>
includes
#include <search.h>
defines
#define __USE_GNU
defines
#define BUFSIZE 2048
structs
struct mapstruct { struct hsearch_data htab; char **key_array; char **val_array; int num; };
functions
int lang_get_index(const char *lang) { const struct language *l; for (l = &lang_map[0]; l->name != NULL; l++) { if (strcmp(l->name, lang) == 0) { return l->value; }
functions
void create_hash(int max) { destroy_hash(); hcreate_r(max, &map.htab); map.key_array = (char **)calloc(max, sizeof(char *)); map.val_array = (char **)calloc(max, sizeof(char *)); map.num = max; }
functions
void destroy_hash() { int i; hdestroy_r(&map.htab); if (map.key_array) { for (i = 0; i < map.num; i++) { free(map.key_array[i]); }