Projectname large_stringclasses 15
values | Filepath large_stringlengths 4 106 ⌀ | Function large_stringlengths 11 3.45k | Label list |
|---|---|---|---|
Linux Kernel | sound/soc/codecs/da9055.c | static int da9055_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) {
struct snd_soc_component *component = codec_dai->component;
struct da9055_priv *da9055 = snd_soc_component_get_drvdata(component);
u8 aif_clk_mode, aif_ctrl, mode;
switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
case SND_SOC_DAIFMT_... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/da9055.c | static int da9055_set_dai_pll(struct snd_soc_dai *codec_dai, int pll_id,
int source, unsigned int fref,
unsigned int fout) {
struct snd_soc_component *component = codec_dai->component;
struct da9055_priv *da9055 = snd_soc_component_get_drvdata(component);
... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/da9055.c |
static int da9055_i2c_probe(struct i2c_client *i2c) {
struct da9055_priv *da9055;
struct da9055_platform_data *pdata = dev_get_platdata(&i2c->dev);
int ret;
da9055 = devm_kzalloc(&i2c->dev, sizeof(struct da9055_priv), GFP_KERNEL);
if (!da9055)
return -ENOMEM;
if (pdata)
da9055->pdata = pdata;
... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/dmic.c |
static int dmic_component_probe(struct snd_soc_component *component) {
struct dmic *dmic;
dmic = devm_kzalloc(component->dev, sizeof(*dmic), GFP_KERNEL);
if (!dmic)
return -ENOMEM;
dmic->gpio_en =
devm_gpiod_get_optional(component->dev, "dmicen", GPIOD_OUT_LOW);
if (IS_ERR(dmic->gpio_en))
ret... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/es7134.c | static int es7134_check_mclk(struct snd_soc_dai *dai, struct es7134_data *priv,
unsigned int rate) {
unsigned int mfs = priv->mclk / rate;
int i, j;
for (i = 0; i < priv->chip->mode_num; i++) {
const struct es7134_clock_mode *mode = &priv->chip->modes[i];
if (rate < mode->ra... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/es7134.c |
static int es7134_probe(struct platform_device *pdev) {
struct device *dev = &pdev->dev;
struct es7134_data *priv;
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
if (!priv)
return -ENOMEM;
platform_set_drvdata(pdev, priv);
priv->chip = of_device_get_match_data(dev);
if (!priv->chip) {
dev... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/es7241.c | static int es7241_set_provider_mode(struct es7241_data *priv,
const struct es7241_clock_mode *mode,
unsigned int mfs) {
if (mfs && mfs != mode->mst_mfs)
return -EINVAL;
es7241_set_mode(priv, mode->mst_m0, mode->mst_m1);
return 0;
} | [
1,
0
] |
Linux Kernel | sound/soc/codecs/es8316.c | static int es8316_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 es8316_priv *es8316 = snd_soc_component_get_drvdata(component);
int i, ret;
int count = 0;
es8316->sysc... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/es8316.c | static int es8316_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) {
struct snd_soc_component *component = codec_dai->component;
u8 serdata1 = 0;
u8 serdata2 = 0;
u8 clksw;
u8 mask;
if ((fmt & SND_SOC_DAIFMT_MASTER_MASK) == SND_SOC_DAIFMT_CBP_CFP)
serdata1 |= ES8316_SERDATA1_MASTER;
if (... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/es8316.c |
static int es8316_mute(struct snd_soc_dai *dai, int mute, int direction) {
snd_soc_component_update_bits(dai->component, ES8316_DAC_SET1, 0x20,
mute ? 0x20 : 0);
return 0;
}
#define ES8316_FORMATS \
(SNDRV_PCM_FMTBIT_S16_LE ... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/es8316.c |
static void es8316_remove(struct snd_soc_component *component) {
struct es8316_priv *es8316 = snd_soc_component_get_drvdata(component);
clk_disable_unprepare(es8316->mclk);
} | [
0,
0
] |
Linux Kernel | sound/soc/codecs/es8326.c | static void es8326_jack_detect_handler(struct work_struct *work) {
struct es8326_priv *es8326 =
container_of(work, struct es8326_priv, jack_detect_work.work);
struct snd_soc_component *comp = es8326->component;
unsigned int iface;
mutex_lock(&es8326->lock);
iface = snd_soc_component_read(comp, ES8326_H... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/es8326.c | static void es8326_disable_jack_detect(struct snd_soc_component *component) {
struct es8326_priv *es8326 = snd_soc_component_get_drvdata(component);
dev_dbg(component->dev, "Enter into %s\n", __func__);
if (!es8326->jack)
return;
cancel_delayed_work_sync(&es8326->jack_detect_work);
mutex_lock(&es8326->l... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/es8328.c | static int es8328_set_deemph(struct snd_soc_component *component) {
struct es8328_priv *es8328 = snd_soc_component_get_drvdata(component);
int val, i, best;
if (es8328->deemph) {
best = 0;
for (i = 1; i < ARRAY_SIZE(deemph_settings); i++) {
if (abs(deemph_settings[i].rate - es8328->playback_fs) <
... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/es8328.c |
static int es8328_get_deemph(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
struct es8328_priv *es8328 = snd_soc_component_get_drvdata(component);
ucontrol->value.integer.value[0] = es... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/es8328.c |
static int es8328_resume(struct snd_soc_component *component) {
struct regmap *regmap = dev_get_regmap(component->dev, NULL);
struct es8328_priv *es8328;
int ret;
es8328 = snd_soc_component_get_drvdata(component);
ret = clk_prepare_enable(es8328->clk);
if (ret) {
dev_err(component->dev, "unable to en... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/es8328.c |
int es8328_probe(struct device *dev, struct regmap *regmap) {
struct es8328_priv *es8328;
int ret;
int i;
if (IS_ERR(regmap))
return PTR_ERR(regmap);
es8328 = devm_kzalloc(dev, sizeof(*es8328), GFP_KERNEL);
if (es8328 == NULL)
return -ENOMEM;
es8328->regmap = regmap;
for (i = 0; i < ARRAY_S... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/hda-dai.c |
static int hda_codec_dai_startup(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai) {
struct hda_pcm_stream *stream_info;
struct hda_codec *codec;
struct hda_pcm *pcm;
int ret;
codec = dev_to_hda_codec(dai->dev);
stream_info = snd_soc_dai_get_dma_data(dai, subst... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/hdac_hda.c |
static void hdac_hda_dai_close(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai) {
struct snd_soc_component *component = dai->component;
struct hdac_hda_priv *hda_pvt;
struct hda_pcm_stream *hda_stream;
struct hda_pcm *pcm;
hda_pvt = snd_soc_component_get_drvdata(c... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/hdac_hda.c |
static bool is_hdmi_codec(struct hda_codec *hcodec) {
struct hda_pcm *cpcm;
list_for_each_entry(cpcm, &hcodec->pcm_list_head, list) {
if (cpcm->pcm_type == HDA_PCM_TYPE_HDMI)
return true;
}
return false;
} | [
0,
0
] |
Linux Kernel | sound/soc/codecs/hdac_hdmi.c |
static void hdac_hdmi_jack_report_sync(struct hdac_hdmi_pcm *pcm,
struct hdac_hdmi_port *port,
bool is_connect) {
hdac_hdmi_jack_report(pcm, port, is_connect);
hdac_hdmi_port_dapm_update(port);
} | [
0,
0
] |
Linux Kernel | sound/soc/codecs/hdac_hdmi.c | static int hdac_hdmi_port_select_set(struct hdac_device *hdev,
struct hdac_hdmi_port *port) {
int num_ports;
if (!port->pin->mst_capable)
return 0;
num_ports = hdac_hdmi_get_port_len(hdev, port->pin->nid);
if (num_ports < 0)
return -EIO;
/*
* Device List Lengt... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/hdac_hdmi.c |
static unsigned int sad_format(const u8 *sad) {
return ((sad[0] >> 0x3) & 0x1f);
} | [
0,
0
] |
Linux Kernel | sound/soc/codecs/hdac_hdmi.c |
static void hdac_hdmi_set_dip_index(struct hdac_device *hdev, hda_nid_t pin_nid,
int packet_index, int byte_index) {
int val;
val = (packet_index << 5) | (byte_index & 0x1f);
snd_hdac_codec_write(hdev, pin_nid, 0, AC_VERB_SET_HDMI_DIP_INDEX, val);
} | [
0,
0
] |
Linux Kernel | sound/soc/codecs/hdac_hdmi.c |
static int hdac_hdmi_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask,
unsigned int rx_mask, int slots,
int slot_width) {
struct hdac_hdmi_priv *hdmi = snd_soc_dai_get_drvdata(dai);
struct hdac_device *hdev = hdmi->hdev;
struct hdac_hd... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/hdac_hdmi.c |
static void
hdac_hdmi_fill_route(struct snd_soc_dapm_route *route, const char *sink,
const char *control, const char *src,
int (*handler)(struct snd_soc_dapm_widget *src,
struct snd_soc_dapm_widget *sink)) {
route->sink = sink;
route->so... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/hdac_hdmi.c |
static struct hdac_hdmi_pcm *hdac_hdmi_get_pcm(struct hdac_device *hdev,
struct hdac_hdmi_port *port) {
struct hdac_hdmi_priv *hdmi = hdev_to_hdmi_priv(hdev);
struct hdac_hdmi_pcm *pcm;
struct hdac_hdmi_port *p;
list_for_each_entry(pcm, &hdmi->pcm_list, head) {
... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/hdac_hdmi.c |
static void hdac_hdmi_set_amp(struct hdac_device *hdev, hda_nid_t nid,
int val) {
if (get_wcaps(hdev, nid) & AC_WCAP_OUT_AMP)
snd_hdac_codec_write(hdev, nid, 0, AC_VERB_SET_AMP_GAIN_MUTE, val);
} | [
0,
0
] |
Linux Kernel | sound/soc/codecs/hdac_hdmi.c | static void hdac_hdmi_add_pinmux_cvt_route(struct hdac_device *hdev,
struct snd_soc_dapm_widget *widgets,
struct snd_soc_dapm_route *route,
int rindex) {
struct hdac_hdmi_priv *hdmi = hdev_... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/hdac_hdmi.c |
static int hdac_hdmi_init_dai_map(struct hdac_device *hdev) {
struct hdac_hdmi_priv *hdmi = hdev_to_hdmi_priv(hdev);
struct hdac_hdmi_dai_port_map *dai_map;
struct hdac_hdmi_cvt *cvt;
int dai_id = 0;
if (list_empty(&hdmi->cvt_list))
return -EINVAL;
list_for_each_entry(cvt, &hdmi->cvt_list, head) {
... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/hdac_hdmi.c | static void hdac_hdmi_skl_enable_dp12(struct hdac_device *hdev) {
unsigned int vendor_param;
struct hdac_hdmi_priv *hdmi = hdev_to_hdmi_priv(hdev);
unsigned int vendor_nid = hdmi->drv_data->vendor_nid;
vendor_param =
snd_hdac_codec_read(hdev, vendor_nid, 0, INTEL_GET_VENDOR_VERB, 0);
if (vendor_param =... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/hdac_hdmi.c | static int hdac_hdmi_create_eld_ctl(struct snd_soc_component *component,
struct hdac_hdmi_pcm *pcm) {
struct snd_kcontrol *kctl;
struct snd_kcontrol_new hdmi_eld_ctl = {
.access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE,
.iface = SNDRV_CTL_ELEM_IFA... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/hdac_hdmi.c | static void hdac_hdmi_eld_notify_cb(void *aptr, int port, int pipe) {
struct hdac_device *hdev = aptr;
struct hdac_hdmi_priv *hdmi = hdev_to_hdmi_priv(hdev);
struct hdac_hdmi_pin *pin;
struct hdac_hdmi_port *hport = NULL;
struct snd_soc_component *component = hdmi->component;
int i;
hda_nid_t pin_nid = p... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/hdmi-codec.c |
static int hdmi_eld_ctl_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo) {
uinfo->type = SNDRV_CTL_ELEM_TYPE_BYTES;
uinfo->count = sizeof_field(struct hdmi_codec_priv, eld);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/codecs/hdmi-codec.c | static int hdmi_codec_get_ch_alloc_table_idx(struct hdmi_codec_priv *hcp,
unsigned char channels) {
int i;
u8 spk_alloc;
unsigned long spk_mask;
const struct hdmi_codec_cea_spk_alloc *cap = hdmi_codec_channel_alloc;
spk_alloc = drm_eld_get_spk_alloc(hcp->eld);
s... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/hdmi-codec.c |
static int hdmi_codec_iec958_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo) {
uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958;
uinfo->count = 1;
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/codecs/hdmi-codec.c |
static int hdmi_codec_iec958_mask_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
memset(ucontrol->value.iec958.status, 0xff,
sizeof_field(struct hdmi_codec_priv, iec_status));
return 0;
} | [
1,
0
] |
Linux Kernel | sound/soc/codecs/hdmi-codec.c |
static int hdmi_codec_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai) {
struct hdmi_codec_priv *hcp = snd_soc_dai_get_drvdata(dai);
struct hdmi_codec_daifmt *cf = dai->playback_dma_data;
stru... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/hdmi-codec.c | static int hdmi_codec_pcm_new(struct snd_soc_pcm_runtime *rtd,
struct snd_soc_dai *dai) {
struct snd_soc_dai_driver *drv = dai->driver;
struct hdmi_codec_priv *hcp = snd_soc_dai_get_drvdata(dai);
unsigned int i;
int ret;
ret = snd_pcm_add_chmap_ctls(rtd->pcm, SNDRV_PCM_STREAM_PL... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/hdmi-codec.c | static int hdmi_dai_probe(struct snd_soc_dai *dai) {
struct snd_soc_dapm_context *dapm;
struct hdmi_codec_daifmt *daifmt;
struct snd_soc_dapm_route route[] = {
{
.sink = "TX",
.source = dai->driver->playback.stream_name,
},
{
.sink = dai->driver->capture.stream_name... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/hdmi-codec.c |
static int hdmi_dai_spdif_probe(struct snd_soc_dai *dai) {
struct hdmi_codec_daifmt *cf;
int ret;
ret = hdmi_dai_probe(dai);
if (ret)
return ret;
cf = dai->playback_dma_data;
cf->fmt = HDMI_SPDIF;
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/codecs/hdmi-codec.c |
static void hdmi_remove(struct snd_soc_component *component) {
struct hdmi_codec_priv *hcp = snd_soc_component_get_drvdata(component);
if (hcp->hcd.ops->hook_plugged_cb)
hcp->hcd.ops->hook_plugged_cb(component->dev->parent, hcp->hcd.data, NULL,
NULL);
} | [
1,
0
] |
Linux Kernel | sound/soc/codecs/inno_rk3036.c |
static int rk3036_codec_antipop_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
int val, ret, regmsk;
val = (ucontrol->value.integer.value[0] ? INNO_R09_HP_ANTIPOP_ON
... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/inno_rk3036.c |
static int rk3036_codec_dai_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *hw_params,
struct snd_soc_dai *dai) {
struct snd_soc_component *component = dai->component;
unsigned int reg02_val = 0, reg03_val = 0;
... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/inno_rk3036.c |
static int rk3036_codec_probe(struct snd_soc_component *component) {
rk3036_codec_reset(component);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/codecs/inno_rk3036.c | static int rk3036_codec_set_bias_level(struct snd_soc_component *component,
enum snd_soc_bias_level level) {
switch (level) {
case SND_SOC_BIAS_STANDBY:
snd_soc_component_write(component, INNO_R10, INNO_R10_MAX_CUR);
/* start precharge */
snd_soc_component_write(c... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/inno_rk3036.c |
static int rk3036_codec_platform_remove(struct platform_device *pdev) {
struct rk3036_codec_priv *priv = dev_get_drvdata(&pdev->dev);
clk_disable_unprepare(priv->pclk);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/codecs/isabelle.c |
static int isabelle_hs_mute(struct snd_soc_dai *dai, int mute, int direction) {
snd_soc_component_update_bits(dai->component, ISABELLE_DAC1_SOFTRAMP_REG,
BIT(4), (mute ? BIT(4) : 0));
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/codecs/isabelle.c |
static int isabelle_set_bias_level(struct snd_soc_component *component,
enum snd_soc_bias_level level) {
switch (level) {
case SND_SOC_BIAS_ON:
break;
case SND_SOC_BIAS_PREPARE:
break;
case SND_SOC_BIAS_STANDBY:
snd_soc_component_update_bits(component, ISABELLE_P... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/isabelle.c |
static int isabelle_i2c_probe(struct i2c_client *i2c) {
struct regmap *isabelle_regmap;
int ret = 0;
isabelle_regmap = devm_regmap_init_i2c(i2c, &isabelle_regmap_config);
if (IS_ERR(isabelle_regmap)) {
ret = PTR_ERR(isabelle_regmap);
dev_err(&i2c->dev, "Failed to allocate register map: %d\n", ret);
... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/jz4725b.c |
static bool jz4725b_codec_can_access_reg(struct device *dev, unsigned int reg) {
return (reg != JZ4725B_CODEC_REG_TR1) && (reg != JZ4725B_CODEC_REG_TR2);
} | [
0,
0
] |
Linux Kernel | sound/soc/codecs/jz4740.c |
static int jz4740_codec_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai) {
struct jz4740_codec *jz4740_codec =
snd_soc_component_get_drvdata(dai->component);
uint32_t val;
switch (p... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/jz4760.c | static int jz4760_codec_set_bias_level(struct snd_soc_component *codec,
enum snd_soc_bias_level level) {
struct jz_codec *jz_codec = snd_soc_component_get_drvdata(codec);
struct regmap *regmap = jz_codec->regmap;
switch (level) {
case SND_SOC_BIAS_PREPARE:
regmap_wri... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/jz4760.c |
static void jz4760_codec_shutdown(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai) {
struct snd_soc_component *codec = dai->component;
struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(codec);
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
snd... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/jz4760.c | static int jz4760_codec_mute_stream(struct snd_soc_dai *dai, int mute,
int direction) {
struct snd_soc_component *codec = dai->component;
struct jz_codec *jz_codec = snd_soc_component_get_drvdata(codec);
unsigned int gain_bit = mute ? REG_IFR_GDO : REG_IFR_GUP;
unsigned int v... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/jz4760.c |
static void jz4760_codec_codec_remove(struct snd_soc_component *codec) {
struct jz_codec *jz_codec = snd_soc_component_get_drvdata(codec);
clk_disable_unprepare(jz_codec->clk);
} | [
0,
0
] |
Linux Kernel | sound/soc/codecs/jz4760.c |
static int jz4760_codec_probe(struct platform_device *pdev) {
struct device *dev = &pdev->dev;
struct jz_codec *codec;
int ret;
codec = devm_kzalloc(dev, sizeof(*codec), GFP_KERNEL);
if (!codec)
return -ENOMEM;
codec->dev = dev;
codec->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(c... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/jz4770.c | static int jz4770_codec_set_bias_level(struct snd_soc_component *codec,
enum snd_soc_bias_level level) {
struct jz_codec *jz_codec = snd_soc_component_get_drvdata(codec);
struct regmap *regmap = jz_codec->regmap;
switch (level) {
case SND_SOC_BIAS_PREPARE:
regmap_wri... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/jz4770.c |
static int jz4770_codec_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai) {
struct jz_codec *codec = snd_soc_component_get_drvdata(dai->component);
unsigned int rate, bit_width;
switch (pa... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/jz4770.c |
static int jz4770_codec_io_wait(struct jz_codec *codec) {
u32 reg;
return readl_poll_timeout(codec->base + ICDC_RGADW_OFFSET, reg,
!(reg & ICDC_RGADW_RGWR), 1000, 1 * USEC_PER_SEC);
} | [
0,
0
] |
Linux Kernel | sound/soc/codecs/jz4770.c | static int jz4770_codec_reg_read(void *context, unsigned int reg,
unsigned int *val) {
struct jz_codec *codec = context;
unsigned int i;
u32 tmp;
int ret;
ret = jz4770_codec_io_wait(codec);
if (ret)
return ret;
tmp = readl(codec->base + ICDC_RGADW_OFFSET);
tmp = (t... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/jz4770.c |
static int jz4770_codec_probe(struct platform_device *pdev) {
struct device *dev = &pdev->dev;
struct jz_codec *codec;
int ret;
codec = devm_kzalloc(dev, sizeof(*codec), GFP_KERNEL);
if (!codec)
return -ENOMEM;
codec->dev = dev;
codec->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(c... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/lochnagar-sc.c |
static void lochnagar_sc_line_shutdown(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai) {
struct snd_soc_component *comp = dai->component;
struct lochnagar_sc_priv *priv = snd_soc_component_get_drvdata(comp);
clk_disable_unprepare(priv->mclk);
} | [
0,
0
] |
Linux Kernel | sound/soc/codecs/lochnagar-sc.c |
static int lochnagar_sc_set_usb_fmt(struct snd_soc_dai *dai, unsigned int fmt) {
return lochnagar_sc_check_fmt(dai, fmt, SND_SOC_DAIFMT_CBM_CFM);
} | [
0,
0
] |
Linux Kernel | sound/soc/codecs/lochnagar-sc.c |
static int lochnagar_sc_probe(struct platform_device *pdev) {
struct lochnagar_sc_priv *priv;
int ret;
priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
if (!priv)
return -ENOMEM;
priv->mclk = devm_clk_get(&pdev->dev, "mclk");
if (IS_ERR(priv->mclk)) {
ret = PTR_ERR(priv->mclk);
dev... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/lpass-rx-macro.c |
static bool rx_is_readable_register(struct device *dev, unsigned int reg) {
switch (reg) {
case CDC_RX_TOP_HPHL_COMP_RD_LSB:
case CDC_RX_TOP_HPHL_COMP_RD_MSB:
case CDC_RX_TOP_HPHR_COMP_RD_LSB:
case CDC_RX_TOP_HPHR_COMP_RD_MSB:
case CDC_RX_TOP_DSD0_DEBUG_CFG2:
case CDC_RX_TOP_DSD1_DEBUG_CFG2:
case CDC_R... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/lpass-rx-macro.c | static int rx_macro_set_prim_interpolator_rate(struct snd_soc_dai *dai,
int rate_reg_val,
u32 sample_rate) {
u8 int_1_mix1_inp;
u32 j, port;
u16 int_mux_cfg0, int_mux_cfg1;
u16 int_fs_reg;
u8 inp0_sel, inp1_sel, inp... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/lpass-rx-macro.c |
static int rx_macro_set_mix_interpolator_rate(struct snd_soc_dai *dai,
int rate_reg_val,
u32 sample_rate) {
u8 int_2_inp;
u32 j, port;
u16 int_mux_cfg1, int_fs_reg;
u8 int_mux_cfg1_val;
struct snd_soc_component *comp... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/lpass-rx-macro.c |
static void rx_macro_mclk_enable(struct rx_macro *rx, bool mclk_enable) {
struct regmap *regmap = rx->regmap;
if (mclk_enable) {
if (rx->rx_mclk_users == 0) {
regmap_update_bits(regmap, CDC_RX_CLK_RST_CTRL_MCLK_CONTROL,
CDC_RX_CLK_MCLK_EN_MASK | CDC_RX_CLK_MCLK2_EN_MASK,
... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/lpass-rx-macro.c | static int rx_macro_load_compander_coeff(struct snd_soc_component *component,
struct rx_macro *rx, int comp,
int event) {
u16 comp_coeff_lsb_reg, comp_coeff_msb_reg;
int i;
int hph_pwr_mode;
if (comp == INTERP_AUX)
return 0;
... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/lpass-rx-macro.c | static int rx_macro_config_softclip(struct snd_soc_component *component,
struct rx_macro *rx, int event) {
if (!rx->is_softclip_on)
return 0;
if (SND_SOC_DAPM_EVENT_ON(event)) {
rx_macro_enable_softclip_clk(component, rx, true);
/* Enable Softclip control */
sn... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/lpass-rx-macro.c | static int rx_macro_config_aux_hpf(struct snd_soc_component *component,
struct rx_macro *rx, int event) {
if (SND_SOC_DAPM_EVENT_ON(event)) {
if (!rx->is_aux_hpf_on)
snd_soc_component_update_bits(component, CDC_RX_RX2_RX_PATH_CFG1, 0x04,
... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/lpass-rx-macro.c |
static int rx_macro_mux_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct snd_soc_dapm_widget *widget = snd_soc_dapm_kcontrol_widget(kcontrol);
struct snd_soc_component *component = snd_soc_dapm_to_component(widget->dapm);
struct soc_enum *e = (struct so... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/lpass-rx-macro.c | static int rx_macro_set_iir_gain(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_POST_PMU:
case SND_SOC_DAPM_PRE_PMD:
if (strnstr(w->name,... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/lpass-rx-macro.c | static int
rx_macro_put_iir_band_audio_mixer(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
struct wcd_iir_filter_ctl *ctl =
(struct wcd_iir_filter_ctl *)kcontrol->private_value... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/lpass-rx-macro.c |
static void swclk_gate_disable(struct clk_hw *hw) {
struct rx_macro *rx = to_rx_macro(hw);
regmap_update_bits(rx->regmap, CDC_RX_CLK_RST_CTRL_SWR_CONTROL,
CDC_RX_SWR_CLK_EN_MASK, 0);
rx_macro_mclk_enable(rx, false);
clk_disable_unprepare(rx->mclk);
} | [
0,
0
] |
Linux Kernel | sound/soc/codecs/lpass-rx-macro.c |
static int swclk_gate_is_enabled(struct clk_hw *hw) {
struct rx_macro *rx = to_rx_macro(hw);
int ret, val;
regmap_read(rx->regmap, CDC_RX_CLK_RST_CTRL_SWR_CONTROL, &val);
ret = val & BIT(0);
return ret;
} | [
0,
0
] |
Linux Kernel | sound/soc/codecs/lpass-tx-macro.c | static int tx_macro_mclk_enable(struct tx_macro *tx, bool mclk_enable) {
struct regmap *regmap = tx->regmap;
if (mclk_enable) {
if (tx->tx_mclk_users == 0) {
regmap_update_bits(regmap, CDC_TX_TOP_CSR_FREQ_MCLK, 0x01, 0x01);
regmap_update_bits(regmap, CDC_TX_CLK_RST_CTRL_MCLK_CONTROL,
... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/lpass-tx-macro.c |
static int tx_macro_mclk_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);
struct tx_macro *tx = snd_soc_component_get_drvdata(component);
switch (event) {
case SND_SOC_DAPM_... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/lpass-tx-macro.c |
static int tx_macro_tx_mixer_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct snd_soc_dapm_widget *widget = snd_soc_dapm_kcontrol_widget(kcontrol);
struct snd_soc_component *component = snd_soc_dapm_to_component(widget->dapm);
struct soc_mixer_cont... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/lpass-tx-macro.c |
static int tx_macro_tx_mixer_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct snd_soc_dapm_widget *widget = snd_soc_dapm_kcontrol_widget(kcontrol);
struct snd_soc_component *component = snd_soc_dapm_to_component(widget->dapm);
struct snd_soc_dapm_u... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/lpass-tx-macro.c |
static int tx_macro_dec_mode_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
int value = ucontrol->value.integer.value[0];
struct soc_enum *e = (struct soc_enum *)kcontrol->priva... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/lpass-tx-macro.c |
static int tx_macro_set_bcs(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
int value = ucontrol->value.integer.value[0];
struct tx_macro *tx = snd_soc_component_get_drvdata(component);
... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/lpass-tx-macro.c |
static int tx_macro_get_channel_map(struct snd_soc_dai *dai,
unsigned int *tx_num, unsigned int *tx_slot,
unsigned int *rx_num,
unsigned int *rx_slot) {
struct snd_soc_component *component = dai->component;
... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/lpass-tx-macro.c | static int tx_macro_digital_mute(struct snd_soc_dai *dai, int mute,
int stream) {
struct snd_soc_component *component = dai->component;
struct tx_macro *tx = snd_soc_component_get_drvdata(component);
u16 decimator;
if (tx->active_decimator[dai->id] == -1)
return 0;
decim... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/lpass-tx-macro.c |
static int swclk_gate_enable(struct clk_hw *hw) {
struct tx_macro *tx = to_tx_macro(hw);
struct regmap *regmap = tx->regmap;
int ret;
ret = clk_prepare_enable(tx->mclk);
if (ret) {
dev_err(tx->dev, "failed to enable mclk\n");
return ret;
}
tx_macro_mclk_enable(tx, true);
regmap_update_bits(re... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/lpass-tx-macro.c |
static int tx_macro_remove(struct platform_device *pdev) {
struct tx_macro *tx = dev_get_drvdata(&pdev->dev);
clk_disable_unprepare(tx->macro);
clk_disable_unprepare(tx->dcodec);
clk_disable_unprepare(tx->mclk);
clk_disable_unprepare(tx->npl);
clk_disable_unprepare(tx->fsgen);
lpass_macro_pds_exit(tx->... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/lpass-va-macro.c |
static bool va_is_volatile_register(struct device *dev, unsigned int reg) {
switch (reg) {
case CDC_VA_TOP_CSR_CORE_ID_0:
case CDC_VA_TOP_CSR_CORE_ID_1:
case CDC_VA_TOP_CSR_CORE_ID_2:
case CDC_VA_TOP_CSR_CORE_ID_3:
case CDC_VA_TOP_CSR_DMIC0_CTL:
case CDC_VA_TOP_CSR_DMIC1_CTL:
case CDC_VA_TOP_CSR_DMIC2_... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/lpass-va-macro.c | static int va_clk_rsc_fs_gen_request(struct va_macro *va, bool enable) {
struct regmap *regmap = va->regmap;
if (enable) {
regmap_update_bits(regmap, CDC_VA_CLK_RST_CTRL_MCLK_CONTROL,
CDC_VA_MCLK_CONTROL_EN, CDC_VA_MCLK_CONTROL_EN);
regmap_update_bits(regmap, CDC_VA_CLK_RST_CTRL_FS_... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/lpass-va-macro.c |
static int va_macro_mclk_enable(struct va_macro *va, bool mclk_enable) {
struct regmap *regmap = va->regmap;
if (mclk_enable) {
va_clk_rsc_fs_gen_request(va, true);
regcache_mark_dirty(regmap);
regcache_sync_region(regmap, 0x0, VA_MAX_OFFSET);
} else {
va_clk_rsc_fs_gen_request(va, false);
}
... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/lpass-va-macro.c |
static int va_macro_tx_mixer_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct snd_soc_dapm_widget *widget = snd_soc_dapm_kcontrol_widget(kcontrol);
struct snd_soc_component *component = snd_soc_dapm_to_component(widget->dapm);
struct snd_soc_dapm_u... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/lpass-va-macro.c |
static int va_macro_enable_dmic(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event) {
struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm);
unsigned int dmic = w->shift;
switch (event) {
case SND_SOC_DAPM_PRE_PMU:
va_dmic_clk_enable(comp,... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/lpass-va-macro.c |
static int va_macro_get_channel_map(struct snd_soc_dai *dai,
unsigned int *tx_num, unsigned int *tx_slot,
unsigned int *rx_num,
unsigned int *rx_slot) {
struct snd_soc_component *component = dai->component;
... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/lpass-va-macro.c |
static int va_macro_component_probe(struct snd_soc_component *component) {
struct va_macro *va = snd_soc_component_get_drvdata(component);
snd_soc_component_init_regmap(component, va->regmap);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/codecs/lpass-va-macro.c |
static int __maybe_unused va_macro_runtime_resume(struct device *dev) {
struct va_macro *va = dev_get_drvdata(dev);
int ret;
ret = clk_prepare_enable(va->mclk);
if (ret) {
dev_err(va->dev, "unable to prepare mclk\n");
return ret;
}
regcache_cache_only(va->regmap, false);
regcache_sync(va->regma... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/lpass-wsa-macro.c | static int wsa_macro_set_interpolator_rate(struct snd_soc_dai *dai,
u32 sample_rate) {
int rate_val = 0;
int i, ret;
for (i = 0; i < ARRAY_SIZE(int_mix_sample_rate_val); i++) {
if (sample_rate == int_mix_sample_rate_val[i].sample_rate) {
rate_val = int_mix_sam... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/lpass-wsa-macro.c |
static int wsa_macro_get_channel_map(struct snd_soc_dai *dai,
unsigned int *tx_num,
unsigned int *tx_slot,
unsigned int *rx_num,
unsigned int *rx_slot) {
struct snd_soc_... | [
1,
0
] |
Linux Kernel | sound/soc/codecs/lpass-wsa-macro.c | static void wsa_macro_mclk_enable(struct wsa_macro *wsa, bool mclk_enable) {
struct regmap *regmap = wsa->regmap;
if (mclk_enable) {
if (wsa->wsa_mclk_users == 0) {
regcache_mark_dirty(regmap);
regcache_sync(regmap);
regmap_update_bits(regmap, CDC_WSA_TOP_FREQ_MCLK, 0x01, 0x01);
regmap... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/lpass-wsa-macro.c | static int wsa_macro_config_softclip(struct snd_soc_component *component,
int path, int event) {
u16 softclip_ctrl_reg;
struct wsa_macro *wsa = snd_soc_component_get_drvdata(component);
int softclip_path = 0;
if (path == WSA_MACRO_COMP1)
softclip_path = WSA_MACRO_SOFTCL... | [
0,
0
] |
Linux Kernel | sound/soc/codecs/lpass-wsa-macro.c |
static int wsa_macro_enable_main_path(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol,
int event) {
struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
u16 reg;
reg = CDC_WSA_RX0_RX_PATH_CTL + WSA_MACR... | [
0,
0
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.