Projectname large_stringclasses 15
values | Filepath large_stringlengths 4 106 ⌀ | Function large_stringlengths 11 3.45k | Label list |
|---|---|---|---|
Linux Kernel | sound/soc/cirrus/edb93xx.c |
static int edb93xx_probe(struct platform_device *pdev) {
struct snd_soc_card *card = &snd_soc_edb93xx;
int ret;
ret = ep93xx_i2s_acquire();
if (ret)
return ret;
card->dev = &pdev->dev;
ret = snd_soc_register_card(card);
if (ret) {
dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n", ret... | [
1,
0
] |
Linux Kernel | sound/soc/cirrus/ep93xx-ac97.c | static void ep93xx_ac97_warm_reset(struct snd_ac97 *ac97) {
struct ep93xx_ac97_info *info = ep93xx_ac97_info;
mutex_lock(&info->lock);
ep93xx_ac97_write_reg(info, AC97SYNC, AC97SYNC_TIMEDSYNC);
ep93xx_ac97_write_reg(info, AC97IM, AC97_CODECREADY);
if (!wait_for_completion_timeout(&info->done, AC97_TIMEOUT))... | [
0,
0
] |
Linux Kernel | sound/soc/cirrus/ep93xx-i2s.c |
static inline unsigned ep93xx_i2s_read_reg(struct ep93xx_i2s_info *info,
unsigned reg) {
return __raw_readl(info->regs + reg);
} | [
0,
0
] |
Linux Kernel | sound/soc/cirrus/ep93xx-i2s.c | static void ep93xx_i2s_disable(struct ep93xx_i2s_info *info, int stream) {
unsigned base_reg;
if (IS_ENABLED(CONFIG_SND_EP93XX_SOC_I2S_WATCHDOG) &&
stream == SNDRV_PCM_STREAM_PLAYBACK)
ep93xx_i2s_write_reg(info, EP93XX_I2S_TXCTRL, 0);
/* Disable fifo */
if (stream == SNDRV_PCM_STREAM_PLAYBACK)
b... | [
0,
0
] |
Linux Kernel | sound/soc/cirrus/ep93xx-i2s.c | static int ep93xx_i2s_suspend(struct snd_soc_component *component) {
struct ep93xx_i2s_info *info = snd_soc_component_get_drvdata(component);
if (!snd_soc_component_active(component))
return 0;
ep93xx_i2s_disable(info, SNDRV_PCM_STREAM_PLAYBACK);
ep93xx_i2s_disable(info, SNDRV_PCM_STREAM_CAPTURE);
retu... | [
0,
0
] |
Linux Kernel | sound/soc/cirrus/ep93xx-i2s.c |
static int ep93xx_i2s_resume(struct snd_soc_component *component) {
struct ep93xx_i2s_info *info = snd_soc_component_get_drvdata(component);
if (!snd_soc_component_active(component))
return 0;
ep93xx_i2s_enable(info, SNDRV_PCM_STREAM_PLAYBACK);
ep93xx_i2s_enable(info, SNDRV_PCM_STREAM_CAPTURE);
return... | [
0,
0
] |
Linux Kernel | sound/soc/cirrus/ep93xx-i2s.c |
static int ep93xx_i2s_probe(struct platform_device *pdev) {
struct ep93xx_i2s_info *info;
int err;
info = devm_kzalloc(&pdev->dev, sizeof(*info), GFP_KERNEL);
if (!info)
return -ENOMEM;
info->regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(info->regs))
return PTR_ERR(info->regs);
if... | [
1,
0
] |
Linux Kernel | sound/soc/cirrus/ep93xx-i2s.c |
static int ep93xx_i2s_remove(struct platform_device *pdev) {
struct ep93xx_i2s_info *info = dev_get_drvdata(&pdev->dev);
clk_put(info->lrclk);
clk_put(info->sclk);
clk_put(info->mclk);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/cirrus/ep93xx-pcm.c |
static bool ep93xx_pcm_dma_filter(struct dma_chan *chan, void *filter_param) {
struct ep93xx_dma_data *data = filter_param;
if (data->direction == ep93xx_dma_chan_direction(chan)) {
chan->private = data;
return true;
}
return false;
} | [
0,
0
] |
Linux Kernel | sound/soc/cirrus/ep93xx-pcm.c |
int devm_ep93xx_pcm_platform_register(struct device *dev) {
return devm_snd_dmaengine_pcm_register(dev, &ep93xx_dmaengine_pcm_config,
SND_DMAENGINE_PCM_FLAG_NO_DT |
SND_DMAENGINE_PCM_FLAG_COMPAT);
} | [
0,
0
] |
Linux Kernel | sound/soc/cirrus/snappercl15.c |
static int snappercl15_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params) {
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(r... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/88pm860x-codec.c |
static int snd_soc_put_volsw_2r_st(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct soc_mixer_control *mc =
(struct soc_mixer_control *)kcontrol->private_value;
struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
unsigne... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/88pm860x-codec.c |
static int snd_soc_get_volsw_2r_out(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct soc_mixer_control *mc =
(struct soc_mixer_control *)kcontrol->private_value;
struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
unsig... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/88pm860x-codec.c |
static int snd_soc_put_volsw_2r_out(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct soc_mixer_control *mc =
(struct soc_mixer_control *)kcontrol->private_value;
struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
unsig... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/88pm860x-codec.c | static int pm860x_dac_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event) {
struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
unsigned int dac = 0;
int data;
if (!strcmp(w->name, "Left DAC"))
dac = DAC_LEFT;
if (!strcmp(w->nam... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/88pm860x-codec.c | static int pm860x_pcm_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai) {
struct snd_soc_component *component = dai->component;
unsigned char inf = 0, mask = 0;
switch (params_width(params)) {
... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/88pm860x-codec.c | static int pm860x_pcm_set_dai_fmt(struct snd_soc_dai *codec_dai,
unsigned int fmt) {
struct snd_soc_component *component = codec_dai->component;
struct pm860x_priv *pm860x = snd_soc_component_get_drvdata(component);
unsigned char inf = 0, mask = 0;
int ret = -EINVAL;
mask |=... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/88pm860x-codec.c | static int pm860x_set_dai_sysclk(struct snd_soc_dai *codec_dai, int clk_id,
unsigned int freq, int dir) {
struct snd_soc_component *component = codec_dai->component;
struct pm860x_priv *pm860x = snd_soc_component_get_drvdata(component);
if (dir == PM860X_CLK_DIR_OUT)
pm860x->... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/88pm860x-codec.c | static int pm860x_i2s_set_dai_fmt(struct snd_soc_dai *codec_dai,
unsigned int fmt) {
struct snd_soc_component *component = codec_dai->component;
struct pm860x_priv *pm860x = snd_soc_component_get_drvdata(component);
unsigned char inf = 0, mask = 0;
mask |= PCM_INF2_BCLK | PCM_... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/88pm860x-codec.c |
static irqreturn_t pm860x_component_handler(int irq, void *data) {
struct pm860x_priv *pm860x = data;
int status, shrt, report = 0, mic_report = 0;
int mask;
status = pm860x_reg_read(pm860x->i2c, REG_STATUS_1);
shrt = pm860x_reg_read(pm860x->i2c, REG_SHORTS);
mask = pm860x->det.hs_shrt | pm860x->det.hook_... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/88pm860x-codec.c |
static void pm860x_remove(struct snd_soc_component *component) {
struct pm860x_priv *pm860x = snd_soc_component_get_drvdata(component);
int i;
for (i = 3; i >= 0; i--)
free_irq(pm860x->irq[i], pm860x);
} | [
0,
0
] |
Linux Kernel | sound/soc/codecs/88pm860x-codec.c |
static int pm860x_codec_remove(struct platform_device *pdev) { return 0; } | [
0,
0
] |
Linux Kernel | sound/soc/codecs/ab8500-codec.c |
static int filter_control_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo) {
struct filter_control *fc = (struct filter_control *)kcontrol->private_value;
uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
uinfo->count = fc->count;
uinfo->value.integer.min = fc->min;... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/ab8500-codec.c |
static int ab8500_audio_set_bit_delay(struct snd_soc_dai *dai,
unsigned int delay) {
unsigned int mask, val;
struct snd_soc_component *component = dai->component;
mask = BIT(AB8500_DIGIFCONF2_IF0DEL);
val = 0;
switch (delay) {
case 0:
break;
case 1:
val |= ... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/ab8500-codec.c | static int ab8500_codec_driver_probe(struct platform_device *pdev) {
int status;
struct ab8500_codec_drvdata *drvdata;
dev_dbg(&pdev->dev, "%s: Enter.\n", __func__);
drvdata =
devm_kzalloc(&pdev->dev, sizeof(struct ab8500_codec_drvdata), GFP_KERNEL);
if (!drvdata)
return -ENOMEM;
drvdata->sid_st... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/ac97.c |
static int ac97_remove(struct platform_device *pdev) { return 0; } | [
0,
0
] |
Linux Kernel | sound/soc/codecs/ad193x-spi.c |
static int ad193x_spi_probe(struct spi_device *spi) {
const struct spi_device_id *id = spi_get_device_id(spi);
struct regmap_config config;
config = ad193x_regmap_config;
config.val_bits = 8;
config.reg_bits = 16;
config.read_flag_mask = 0x09;
config.write_flag_mask = 0x08;
return ad193x_probe(&spi->... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/ad193x.c |
static int ad193x_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask,
unsigned int rx_mask, int slots, int width) {
struct ad193x_priv *ad193x = snd_soc_component_get_drvdata(dai->component);
unsigned int channels;
switch (slots) {
case 2:
channels = AD193X_2_CHANNEL... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/ad193x.c |
int ad193x_probe(struct device *dev, struct regmap *regmap,
enum ad193x_type type) {
struct ad193x_priv *ad193x;
if (IS_ERR(regmap))
return PTR_ERR(regmap);
ad193x = devm_kzalloc(dev, sizeof(*ad193x), GFP_KERNEL);
if (ad193x == NULL)
return -ENOMEM;
ad193x->regmap = regmap;
ad19... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/ad1980.c |
static bool ad1980_writeable_reg(struct device *dev, unsigned int reg) {
switch (reg) {
case AC97_VENDOR_ID1:
case AC97_VENDOR_ID2:
return false;
default:
return ad1980_readable_reg(dev, reg);
}
} | [
0,
0
] |
Linux Kernel | sound/soc/codecs/ad1980.c | static int ad1980_reset(struct snd_soc_component *component, int try_warm) {
struct snd_ac97 *ac97 = snd_soc_component_get_drvdata(component);
unsigned int retry_cnt = 0;
int ret;
do {
ret = snd_ac97_reset(ac97, true, AD1980_VENDOR_ID, AD1980_VENDOR_MASK);
if (ret >= 0)
return 0;
snd_soc_com... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/ad1980.c | static int ad1980_soc_probe(struct snd_soc_component *component) {
struct snd_ac97 *ac97;
struct regmap *regmap;
int ret;
u16 vendor_id2;
u16 ext_status;
ac97 = snd_soc_new_ac97_component(component, 0, 0);
if (IS_ERR(ac97)) {
ret = PTR_ERR(ac97);
dev_err(component->dev, "Failed to register AC97 c... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/ad1980.c |
static void ad1980_soc_remove(struct snd_soc_component *component) {
struct snd_ac97 *ac97 = snd_soc_component_get_drvdata(component);
snd_soc_component_exit_regmap(component);
snd_soc_free_ac97_component(ac97);
} | [
0,
0
] |
Linux Kernel | sound/soc/codecs/adau1372.c |
static int adau1372_startup(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai) {
struct adau1372 *adau1372 = snd_soc_dai_get_drvdata(dai);
snd_pcm_hw_constraint_list(substream->runtime, 0, SNDRV_PCM_HW_PARAM_RATE,
&adau1372->rate_constraints);
... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/adau1372.c |
static int adau1372_set_bias_level(struct snd_soc_component *component,
enum snd_soc_bias_level level) {
struct adau1372 *adau1372 = snd_soc_component_get_drvdata(component);
switch (level) {
case SND_SOC_BIAS_ON:
break;
case SND_SOC_BIAS_PREPARE:
break;
case SND_S... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/adau1372.c |
static int adau1372_setup_pll(struct adau1372 *adau1372, unsigned int rate) {
u8 regs[5];
unsigned int i;
int ret;
ret = adau_calc_pll_cfg(rate, 49152000, regs);
if (ret < 0)
return ret;
for (i = 0; i < ARRAY_SIZE(regs); i++)
regmap_write(adau1372->regmap, ADAU1372_REG_PLL(i), regs[i]);
return... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/adau1372.c |
static bool adau1372_volatile_register(struct device *dev, unsigned int reg) {
if (reg == ADAU1372_REG_PLL(5))
return true;
return false;
} | [
0,
0
] |
Linux Kernel | sound/soc/codecs/adau1373.c |
static int adau1373_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt) {
struct snd_soc_component *component = dai->component;
struct adau1373 *adau1373 = snd_soc_component_get_drvdata(component);
struct adau1373_dai *adau1373_dai = &adau1373->dais[dai->id];
unsigned int ctrl;
switch (fmt & SND_SOC_DAIF... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/adau1373.c |
static int adau1373_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id,
unsigned int freq, int dir) {
struct adau1373 *adau1373 = snd_soc_component_get_drvdata(dai->component);
struct adau1373_dai *adau1373_dai = &adau1373->dais[dai->id];
switch (clk_id) {
case ADAU1373_CLK_... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/adau1373.c |
static bool adau1373_register_volatile(struct device *dev, unsigned int reg) {
switch (reg) {
case ADAU1373_SOFT_RESET:
case ADAU1373_ADC_DAC_STATUS:
return true;
default:
return false;
}
} | [
0,
0
] |
Linux Kernel | sound/soc/codecs/adau1701.c |
static unsigned int adau1701_register_size(struct device *dev,
unsigned int reg) {
switch (reg) {
case ADAU1701_PINCONF_0:
case ADAU1701_PINCONF_1:
return 3;
case ADAU1701_DSPCTRL:
case ADAU1701_SEROCTL:
case ADAU1701_AUXNPOW:
case ADAU1701_OSCIPOW:
case A... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/adau1701.c |
static int adau1701_safeload(struct sigmadsp *sigmadsp, unsigned int addr,
const uint8_t bytes[], size_t len) {
struct i2c_client *client = to_i2c_client(sigmadsp->dev);
struct adau1701 *adau1701 = i2c_get_clientdata(client);
unsigned int val;
unsigned int i;
uint8_t buf[10];
i... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/adau1701.c |
static int adau1701_set_capture_pcm_format(struct snd_soc_component *component,
struct snd_pcm_hw_params *params) {
struct adau1701 *adau1701 = snd_soc_component_get_drvdata(component);
unsigned int mask = ADAU1701_SEROCTL_WORD_LEN_MASK;
unsigned int val;
switch (par... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/adau1701.c | static int adau1701_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai) {
struct snd_soc_component *component = dai->component;
struct adau1701 *adau1701 = snd_soc_component_get_drvdata(component);
un... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/adau1701.c |
static int adau1701_set_sysclk(struct snd_soc_component *component, int clk_id,
int source, unsigned int freq, int dir) {
unsigned int val;
struct adau1701 *adau1701 = snd_soc_component_get_drvdata(component);
switch (clk_id) {
case ADAU1701_CLK_SRC_OSC:
val = 0x0;
break... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/adau1701.c |
static int adau1701_startup(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai) {
struct adau1701 *adau1701 = snd_soc_component_get_drvdata(dai->component);
return sigmadsp_restrict_params(adau1701->sigmadsp, substream);
}
#define ADAU1701_RATES ... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/adau1701.c |
static void adau1701_remove(struct snd_soc_component *component) {
struct adau1701 *adau1701 = snd_soc_component_get_drvdata(component);
if (adau1701->gpio_nreset)
gpiod_set_value_cansleep(adau1701->gpio_nreset, 0);
regulator_bulk_disable(ARRAY_SIZE(adau1701->supplies), adau1701->supplies);
} | [
0,
0
] |
Linux Kernel | sound/soc/codecs/adau1701.c | static int adau1701_suspend(struct snd_soc_component *component) {
struct adau1701 *adau1701 = snd_soc_component_get_drvdata(component);
regulator_bulk_disable(ARRAY_SIZE(adau1701->supplies), adau1701->supplies);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/codecs/adau1761-i2c.c |
static void adau1761_i2c_remove(struct i2c_client *client) {
adau17x1_remove(&client->dev);
} | [
0,
0
] |
Linux Kernel | sound/soc/codecs/adau1761.c | static int adau1761_dejitter_fixup(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event) {
struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
struct adau *adau = snd_soc_component_get_drvdata(component);
regmap_write(adau->regmap, ADAU1... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/adau1761.c | int adau1761_probe(struct device *dev, struct regmap *regmap,
enum adau17x1_type type,
void (*switch_mode)(struct device *dev)) {
struct snd_soc_dai_driver *dai_drv;
const char *firmware_name;
int ret;
if (type == ADAU1361) {
dai_drv = &adau1361_dai_driver;
firmwar... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/adau1781.c | static int adau1781_set_bias_level(struct snd_soc_component *component,
enum snd_soc_bias_level level) {
struct adau *adau = snd_soc_component_get_drvdata(component);
switch (level) {
case SND_SOC_BIAS_ON:
break;
case SND_SOC_BIAS_PREPARE:
break;
case SND_SOC_BIAS_S... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/adau17x1.c |
static bool adau17x1_has_dsp(struct adau *adau) {
switch (adau->type) {
case ADAU1761:
case ADAU1381:
case ADAU1781:
return true;
default:
return false;
}
} | [
0,
0
] |
Linux Kernel | sound/soc/codecs/adau17x1.c |
static int adau17x1_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id,
unsigned int freq, int dir) {
struct snd_soc_dapm_context *dapm =
snd_soc_component_get_dapm(dai->component);
struct adau *adau = snd_soc_component_get_drvdata(dai->component);
bool is_pll;
bool was... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/adau17x1.c |
static int adau17x1_startup(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai) {
struct adau *adau = snd_soc_component_get_drvdata(dai->component);
if (adau->sigmadsp)
return sigmadsp_restrict_params(adau->sigmadsp, substream);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/codecs/adau17x1.c |
int adau17x1_set_micbias_voltage(struct snd_soc_component *component,
enum adau17x1_micbias_voltage micbias) {
struct adau *adau = snd_soc_component_get_drvdata(component);
switch (micbias) {
case ADAU17X1_MICBIAS_0_90_AVDD:
case ADAU17X1_MICBIAS_0_65_AVDD:
break;
defaul... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/adau17x1.c |
void adau17x1_remove(struct device *dev) {
struct adau *adau = dev_get_drvdata(dev);
clk_disable_unprepare(adau->mclk);
} | [
0,
0
] |
Linux Kernel | sound/soc/codecs/adau1977-i2c.c |
static int adau1977_i2c_probe(struct i2c_client *client) {
struct regmap_config config;
const struct i2c_device_id *id = i2c_match_id(adau1977_i2c_ids, client);
config = adau1977_regmap_config;
config.val_bits = 8;
config.reg_bits = 8;
return adau1977_probe(&client->dev, devm_regmap_init_i2c(client, &con... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/adau1977.c | static int adau1977_reset(struct adau1977 *adau1977) {
int ret;
regcache_cache_bypass(adau1977->regmap, true);
ret =
regmap_write(adau1977->regmap, ADAU1977_REG_POWER, ADAU1977_POWER_RESET);
regcache_cache_bypass(adau1977->regmap, false);
return ret;
} | [
0,
0
] |
Linux Kernel | sound/soc/codecs/adau1977.c |
static int adau1977_power_disable(struct adau1977 *adau1977) {
int ret = 0;
if (!adau1977->enabled)
return 0;
ret = regmap_update_bits(adau1977->regmap, ADAU1977_REG_POWER,
ADAU1977_POWER_PWUP, 0);
if (ret)
return ret;
regcache_mark_dirty(adau1977->regmap);
gpiod_set_... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/adau1977.c |
static bool adau1977_check_sysclk(unsigned int mclk, unsigned int base_freq) {
unsigned int mcs;
if (mclk % (base_freq * 128) != 0)
return false;
mcs = mclk / (128 * base_freq);
if (mcs < 1 || mcs > 6 || mcs == 5)
return false;
return true;
} | [
1,
0
] |
Linux Kernel | sound/soc/codecs/adau7002.c |
static int adau7002_component_probe(struct snd_soc_component *component) {
struct adau7002_priv *adau7002;
adau7002 = devm_kzalloc(component->dev, sizeof(*adau7002), GFP_KERNEL);
if (!adau7002)
return -ENOMEM;
device_property_read_u32(component->dev, "wakeup-delay-ms",
&adau700... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/adau7002.c |
static int adau7002_remove(struct platform_device *pdev) { return 0; }
#ifdef CONFIG_OF | [
0,
0
] |
Linux Kernel | sound/soc/codecs/adau7118-i2c.c |
static bool adau7118_volatile(struct device *dev, unsigned int reg) {
return (reg == ADAU7118_REG_RESET);
} | [
0,
0
] |
Linux Kernel | sound/soc/codecs/adau7118.c |
static int adau7118_set_channel_map(struct snd_soc_dai *dai,
unsigned int tx_num, unsigned int *tx_slot,
unsigned int rx_num,
unsigned int *rx_slot) {
struct adau7118_data *st = snd_soc_component_get_drvdata(d... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/adau7118.c |
static int adau7118_component_probe(struct snd_soc_component *component) {
struct adau7118_data *st = snd_soc_component_get_drvdata(component);
struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component);
int ret = 0;
if (st->hw_mode) {
ret = snd_soc_dapm_new_controls(dapm, adau7118_widgets_... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/adau7118.c | static void adau7118_regulator_disable(void *data) {
struct adau7118_data *st = data;
int ret;
ret = regulator_disable(st->dvdd);
if (ret)
return;
regulator_disable(st->iovdd);
} | [
0,
0
] |
Linux Kernel | sound/soc/codecs/adau7118.c | int adau7118_probe(struct device *dev, struct regmap *map, bool hw_mode) {
struct adau7118_data *st;
int ret;
st = devm_kzalloc(dev, sizeof(*st), GFP_KERNEL);
if (!st)
return -ENOMEM;
st->dev = dev;
st->hw_mode = hw_mode;
dev_set_drvdata(dev, st);
if (!hw_mode) {
st->map = map;
adau7118_d... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/adav803.c |
static int adav803_probe(struct i2c_client *client) {
return adav80x_bus_probe(
&client->dev, devm_regmap_init_i2c(client, &adav80x_regmap_config));
} | [
0,
0
] |
Linux Kernel | sound/soc/codecs/adav80x.c |
static int adav80x_set_adc_clock(struct snd_soc_component *component,
unsigned int sample_rate) {
struct adav80x *adav80x = snd_soc_component_get_drvdata(component);
unsigned int val;
if (sample_rate <= 48000)
val = ADAV80X_ADC_CTRL1_MODULATOR_128FS;
else
val = ADAV80X... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/adav80x.c |
static int adav80x_set_dac_clock(struct snd_soc_component *component,
unsigned int sample_rate) {
struct adav80x *adav80x = snd_soc_component_get_drvdata(component);
unsigned int val;
if (sample_rate <= 48000)
val = ADAV80X_DAC_CTRL2_DIV1 | ADAV80X_DAC_CTRL2_INTERPOL_256FS;
... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/adav80x.c |
static int adav80x_set_bias_level(struct snd_soc_component *component,
enum snd_soc_bias_level level) {
struct adav80x *adav80x = snd_soc_component_get_drvdata(component);
unsigned int mask = ADAV80X_DAC_CTRL1_PD;
switch (level) {
case SND_SOC_BIAS_ON:
break;
case SND_S... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/adav80x.c | static int adav80x_probe(struct snd_soc_component *component) {
struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component);
struct adav80x *adav80x = snd_soc_component_get_drvdata(component);
snd_soc_dapm_force_enable_pin(dapm, "PLL1");
snd_soc_dapm_force_enable_pin(dapm, "PLL2");
/* Power do... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/ak4104.c | static int ak4104_probe(struct snd_soc_component *component) {
struct ak4104_private *ak4104 = snd_soc_component_get_drvdata(component);
int ret;
ret = regulator_enable(ak4104->regulator);
if (ret < 0) {
dev_err(component->dev, "Unable to enable regulator: %d\n", ret);
return ret;
}
ret = regmap_u... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/ak4104.c | static int ak4104_spi_probe(struct spi_device *spi) {
struct ak4104_private *ak4104;
struct gpio_desc *reset_gpiod;
unsigned int val;
int ret;
spi->bits_per_word = 8;
spi->mode = SPI_MODE_0;
ret = spi_setup(spi);
if (ret < 0)
return ret;
ak4104 = devm_kzalloc(&spi->dev, sizeof(struct ak4104_priv... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/ak4118.c | static int ak4118_probe(struct snd_soc_component *component) {
struct ak4118_priv *ak4118 = snd_soc_component_get_drvdata(component);
int ret = 0;
ak4118->component = component;
gpiod_set_value(ak4118->reset, 0);
/* unmask all int1 sources */
ret = regmap_write(ak4118->regmap, AK4118_REG_INT1_MASK, 0x00)... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/ak4375.c |
static int ak4375_dac_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event) {
struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
switch (event) {
case SND_SOC_DAPM_PRE_PMU:
snd_soc_component_update_bits(component, AK4375_00_POWER_MA... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/ak4375.c |
static int __maybe_unused ak4375_runtime_suspend(struct device *dev) {
struct ak4375_priv *ak4375 = dev_get_drvdata(dev);
regcache_cache_only(ak4375->regmap, true);
ak4375_power_off(ak4375);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/codecs/ak4535.c | static int ak4535_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) {
struct snd_soc_component *component = codec_dai->component;
u8 mode1 = 0;
switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
case SND_SOC_DAIFMT_I2S:
mode1 = 0x0002;
break;
case SND_SOC_DAIFMT_LEFT_J:
mode1 = 0x0001;
br... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/ak4535.c |
static int ak4535_set_bias_level(struct snd_soc_component *component,
enum snd_soc_bias_level level) {
switch (level) {
case SND_SOC_BIAS_ON:
snd_soc_component_update_bits(component, AK4535_DAC, 0x20, 0);
break;
case SND_SOC_BIAS_PREPARE:
snd_soc_component_update_bits... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/ak4613.c | static void ak4613_dummy_write(struct work_struct *work) {
struct ak4613_priv *priv =
container_of(work, struct ak4613_priv, dummy_write_work);
struct snd_soc_component *component = priv->component;
unsigned int mgmt1;
unsigned int mgmt3;
udelay(5000000 / priv->rate);
mgmt1 = snd_soc_component_read(... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/ak4613.c | static int ak4613_dai_trigger(struct snd_pcm_substream *substream, int cmd,
struct snd_soc_dai *dai) {
struct snd_soc_component *component = dai->component;
struct ak4613_priv *priv = snd_soc_component_get_drvdata(component);
/*
* FIXME
*
* PW_MGMT1 / PW_MGMT3 needs dummy w... | [
0,
1
] |
Linux Kernel | sound/soc/codecs/ak4613.c | static void ak4613_parse_of(struct ak4613_priv *priv, struct device *dev) {
struct device_node *np = dev->of_node;
char prop[32];
int sdti_num;
int i;
for (i = 0; i < 2; i++) {
snprintf(prop, sizeof(prop), "asahi-kasei,in%d-single-end", i + 1);
if (!of_get_property(np, prop, NULL))
priv->ic |= ... | [
1,
1
] |
Linux Kernel | sound/soc/codecs/ak4613.c |
static int ak4613_i2c_probe(struct i2c_client *i2c) {
struct device *dev = &i2c->dev;
struct device_node *np = dev->of_node;
const struct regmap_config *regmap_cfg;
struct regmap *regmap;
struct ak4613_priv *priv;
regmap_cfg = NULL;
if (np)
regmap_cfg = of_device_get_match_data(dev);
else {
co... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/ak4641.c | static int ak4641_set_deemph(struct snd_soc_component *component) {
struct ak4641_priv *ak4641 = snd_soc_component_get_drvdata(component);
int i, best = 0;
for (i = 0; i < ARRAY_SIZE(deemph_settings); i++) {
if (ak4641->deemph && deemph_settings[i] != 0 &&
abs(deemph_settings[i] - ak4641->playback_f... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/ak4641.c |
static int ak4641_set_dai_sysclk(struct snd_soc_dai *codec_dai, int clk_id,
unsigned int freq, int dir) {
struct snd_soc_component *component = codec_dai->component;
struct ak4641_priv *ak4641 = snd_soc_component_get_drvdata(component);
ak4641->sysclk = freq;
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/codecs/ak4641.c | static int ak4641_i2s_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai) {
struct snd_soc_component *component = dai->component;
struct ak4641_priv *ak4641 = snd_soc_component_get_drvdata(component... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/ak4641.c | static int ak4641_i2s_set_dai_fmt(struct snd_soc_dai *codec_dai,
unsigned int fmt) {
struct snd_soc_component *component = codec_dai->component;
u8 mode1 = 0;
switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
case SND_SOC_DAIFMT_I2S:
mode1 = 0x02;
break;
case SND_SOC_DAIFM... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/ak4642.c |
static int ak4642_dai_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai) {
struct snd_soc_component *component = dai->component;
struct ak4642_priv *priv = snd_soc_component_get_drvdata(component)... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/ak4642.c |
static int ak4642_suspend(struct snd_soc_component *component) {
struct regmap *regmap = dev_get_regmap(component->dev, NULL);
regcache_cache_only(regmap, true);
regcache_mark_dirty(regmap);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/codecs/ak4671.c |
static int ak4671_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai) {
struct snd_soc_component *component = dai->component;
u8 fs;
fs = snd_soc_component_read(component, AK4671_PLL_MODE_SELECT0);
fs... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/ak4671.c | static int ak4671_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt) {
struct snd_soc_component *component = dai->component;
u8 mode;
u8 format;
mode = snd_soc_component_read(component, AK4671_PLL_MODE_SELECT1);
switch (fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) {
case SND_SOC_DAIFMT_CBP_CFP:
mode ... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/ak5386.c |
static int ak5386_soc_resume(struct snd_soc_component *component) {
struct ak5386_priv *priv = snd_soc_component_get_drvdata(component);
return regulator_bulk_enable(ARRAY_SIZE(priv->supplies), priv->supplies);
}
#else | [
0,
0
] |
Linux Kernel | sound/soc/codecs/ak5386.c |
static int ak5386_set_dai_fmt(struct snd_soc_dai *codec_dai,
unsigned int format) {
struct snd_soc_component *component = codec_dai->component;
format &= SND_SOC_DAIFMT_FORMAT_MASK;
if (format != SND_SOC_DAIFMT_LEFT_J && format != SND_SOC_DAIFMT_I2S) {
dev_err(component->dev, "... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/ak5386.c | static int ak5386_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai) {
struct snd_soc_component *component = dai->component;
struct ak5386_priv *priv = snd_soc_component_get_drvdata(component);
if (gpio... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/ak5558.c |
static int ak5558_set_mcki(struct snd_soc_component *component) {
return snd_soc_component_update_bits(component, AK5558_02_CONTROL1,
AK5558_CKS, AK5558_CKS_AUTO);
} | [
0,
0
] |
Linux Kernel | sound/soc/codecs/ak5558.c |
static void ak5558_remove(struct snd_soc_component *component) {
struct ak5558_priv *ak5558 = snd_soc_component_get_drvdata(component);
ak5558_reset(ak5558, true);
} | [
0,
0
] |
Linux Kernel | sound/soc/codecs/alc5623.c | static int amp_mixer_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event) {
struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
/* need to write to 'index-46h' register : */
/* so write index num (here 0x46) to reg 0x6a */
/*... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/alc5623.c |
static int alc5623_suspend(struct snd_soc_component *component) {
struct alc5623_priv *alc5623 = snd_soc_component_get_drvdata(component);
regcache_cache_only(alc5623->regmap, true);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/codecs/alc5623.c | static int alc5623_probe(struct snd_soc_component *component) {
struct alc5623_priv *alc5623 = snd_soc_component_get_drvdata(component);
struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component);
alc5623_reset(component);
if (alc5623->add_ctrl) {
snd_soc_component_write(component, ALC5623_... | [
0,
0
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.