Projectname large_stringclasses 15
values | Filepath large_stringlengths 4 106 ⌀ | Function large_stringlengths 11 3.45k | Label list |
|---|---|---|---|
Linux Kernel | sound/soc/intel/boards/cht_bsw_max98090_ti.c |
static int snd_cht_mc_remove(struct platform_device *pdev) {
struct snd_soc_card *card = platform_get_drvdata(pdev);
struct cht_mc_private *ctx = snd_soc_card_get_drvdata(card);
if (ctx->quirks & QUIRK_PMC_PLT_CLK_0)
clk_disable_unprepare(ctx->mclk);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/intel/boards/cht_bsw_nau8824.c | static int cht_codec_init(struct snd_soc_pcm_runtime *runtime) {
struct cht_mc_private *ctx = snd_soc_card_get_drvdata(runtime->card);
struct snd_soc_jack *jack = &ctx->jack;
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(runtime, 0);
struct snd_soc_component *component = codec_dai->component;
int ret, jac... | [
0,
0
] |
Linux Kernel | sound/soc/intel/boards/cht_bsw_nau8824.c |
static int cht_aif1_startup(struct snd_pcm_substream *substream) {
return snd_pcm_hw_constraint_single(substream->runtime,
SNDRV_PCM_HW_PARAM_RATE, 48000);
} | [
0,
0
] |
Linux Kernel | sound/soc/intel/boards/cht_bsw_rt5645.c |
static void log_quirks(struct device *dev) {
if (cht_rt5645_quirk & CHT_RT5645_SSP2_AIF2)
dev_info(dev, "quirk SSP2_AIF2 enabled");
if (cht_rt5645_quirk & CHT_RT5645_SSP0_AIF1)
dev_info(dev, "quirk SSP0_AIF1 enabled");
if (cht_rt5645_quirk & CHT_RT5645_SSP0_AIF2)
dev_info(dev, "quirk SSP0_AIF2 enable... | [
0,
0
] |
Linux Kernel | sound/soc/intel/boards/cht_bsw_rt5672.c |
static int cht_suspend_pre(struct snd_soc_card *card) {
struct snd_soc_component *component;
struct cht_mc_private *ctx = snd_soc_card_get_drvdata(card);
for_each_card_components(card, component) {
if (!strncmp(component->name, ctx->codec_name, sizeof(ctx->codec_name))) {
dev_dbg(component->dev,
... | [
1,
0
] |
Linux Kernel | sound/soc/intel/boards/cml_rt1011_rt5682.c | static int cml_rt5682_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);
int clk_id, clk_freq, pll_out, ret;
clk_id = RT... | [
0,
0
] |
Linux Kernel | sound/soc/intel/boards/cml_rt1011_rt5682.c |
static int sof_card_late_probe(struct snd_soc_card *card) {
struct card_private *ctx = snd_soc_card_get_drvdata(card);
struct snd_soc_component *component = NULL;
char jack_name[NAME_SIZE];
struct hdmi_pcm *pcm;
int ret, i = 0;
if (list_empty(&ctx->hdmi_pcm_list))
return -EINVAL;
if (ctx->common_hd... | [
1,
0
] |
Linux Kernel | sound/soc/intel/boards/cml_rt1011_rt5682.c | static int snd_cml_rt1011_probe(struct platform_device *pdev) {
struct snd_soc_dai_link *dai_link;
struct card_private *ctx;
struct snd_soc_acpi_mach *mach;
const char *platform_name;
int ret, i;
ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL);
if (!ctx)
return -ENOMEM;
INIT_LIST_HEAD(&ct... | [
1,
0
] |
Linux Kernel | sound/soc/intel/boards/ehl_rt5660.c |
static int card_late_probe(struct snd_soc_card *card) {
struct sof_card_private *ctx = snd_soc_card_get_drvdata(card);
struct sof_hdmi_pcm *pcm;
if (list_empty(&ctx->hdmi_pcm_list))
return -ENOENT;
if (!ctx->idisp_codec)
return 0;
pcm = list_first_entry(&ctx->hdmi_pcm_list, struct sof_hdmi_pcm, he... | [
0,
0
] |
Linux Kernel | sound/soc/intel/boards/ehl_rt5660.c |
static int rt5660_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);
int ret;
ret = snd_soc_dai_set_sysclk(codec_dai, RT566... | [
0,
0
] |
Linux Kernel | sound/soc/intel/boards/ehl_rt5660.c |
static int snd_ehl_rt5660_probe(struct platform_device *pdev) {
struct snd_soc_acpi_mach *mach;
struct snd_soc_card *card = &snd_soc_card_ehl_rt5660;
struct sof_card_private *ctx;
int ret;
card->dev = &pdev->dev;
ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL);
if (!ctx)
return -ENOMEM;
... | [
1,
0
] |
Linux Kernel | sound/soc/intel/boards/glk_rt5682_max98357a.c |
static int geminilake_hdmi_init(struct snd_soc_pcm_runtime *rtd) {
struct glk_card_private *ctx = snd_soc_card_get_drvdata(rtd->card);
struct snd_soc_dai *dai = asoc_rtd_to_codec(rtd, 0);
struct glk_hdmi_pcm *pcm;
pcm = devm_kzalloc(rtd->card->dev, sizeof(*pcm), GFP_KERNEL);
if (!pcm)
return -ENOMEM;
... | [
1,
0
] |
Linux Kernel | sound/soc/intel/boards/glk_rt5682_max98357a.c |
static int geminilake_rt5682_fe_init(struct snd_soc_pcm_runtime *rtd) {
struct snd_soc_component *component = asoc_rtd_to_cpu(rtd, 0)->component;
struct snd_soc_dapm_context *dapm;
int ret;
dapm = snd_soc_component_get_dapm(component);
ret = snd_soc_dapm_ignore_suspend(dapm, "Reference Capture");
if (ret)... | [
0,
0
] |
Linux Kernel | sound/soc/intel/boards/glk_rt5682_max98357a.c |
static int geminilake_refcap_startup(struct snd_pcm_substream *substream) {
return snd_pcm_hw_constraint_list(
substream->runtime, 0, SNDRV_PCM_HW_PARAM_RATE, &constraints_16000);
} | [
0,
0
] |
Linux Kernel | sound/soc/intel/boards/glk_rt5682_max98357a.c |
static int glk_card_late_probe(struct snd_soc_card *card) {
struct glk_card_private *ctx = snd_soc_card_get_drvdata(card);
struct snd_soc_component *component = NULL;
char jack_name[NAME_SIZE];
struct glk_hdmi_pcm *pcm;
int err;
int i = 0;
if (list_empty(&ctx->hdmi_pcm_list))
return -EINVAL;
if (... | [
1,
0
] |
Linux Kernel | sound/soc/intel/boards/glk_rt5682_max98357a.c | static int geminilake_audio_probe(struct platform_device *pdev) {
struct glk_card_private *ctx;
struct snd_soc_acpi_mach *mach;
const char *platform_name;
struct snd_soc_card *card;
int ret, i;
ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL);
if (!ctx)
return -ENOMEM;
if (acpi_dev_present... | [
1,
0
] |
Linux Kernel | sound/soc/intel/boards/hda_dsp_common.h | static inline int hda_dsp_hdmi_build_controls(struct snd_soc_card *card,
struct snd_soc_component *comp) {
return -EINVAL;
}
#endif
#endif | [
0,
0
] |
Linux Kernel | sound/soc/intel/boards/kbl_da7219_max98357a.c |
static int platform_clock_control(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *k, int event) {
struct snd_soc_dapm_context *dapm = w->dapm;
struct snd_soc_card *card = dapm->card;
struct snd_soc_dai *codec_dai;
int ret = 0;
codec_dai = snd_soc_card_get_codec_dai(card... | [
0,
0
] |
Linux Kernel | sound/soc/intel/boards/kbl_da7219_max98357a.c |
static int kabylake_hdmi1_init(struct snd_soc_pcm_runtime *rtd) {
return kabylake_hdmi_init(rtd, KBL_DPCM_AUDIO_HDMI1_PB);
} | [
0,
0
] |
Linux Kernel | sound/soc/intel/boards/kbl_da7219_max98927.c | static int platform_clock_control(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *k, int event) {
struct snd_soc_dapm_context *dapm = w->dapm;
struct snd_soc_card *card = dapm->card;
struct snd_soc_dai *codec_dai;
int ret = 0;
codec_dai = snd_soc_card_get_codec_dai(card,... | [
0,
0
] |
Linux Kernel | sound/soc/intel/boards/kbl_da7219_max98927.c |
static int kabylake_dmic_init(struct snd_soc_pcm_runtime *rtd) {
int ret;
ret = snd_soc_dapm_ignore_suspend(&rtd->card->dapm, "SoC DMIC");
if (ret)
dev_err(rtd->dev, "SoC DMIC - Ignore suspend failed %d\n", ret);
return ret;
} | [
0,
0
] |
Linux Kernel | sound/soc/intel/boards/kbl_da7219_max98927.c |
static int kabylake_hdmi2_init(struct snd_soc_pcm_runtime *rtd) {
return kabylake_hdmi_init(rtd, KBL_DPCM_AUDIO_HDMI2_PB);
} | [
0,
0
] |
Linux Kernel | sound/soc/intel/boards/kbl_rt5660.c |
static int kabylake_hdmi_init(struct snd_soc_pcm_runtime *rtd, int device) {
struct kbl_codec_private *ctx = snd_soc_card_get_drvdata(rtd->card);
struct snd_soc_dai *dai = asoc_rtd_to_codec(rtd, 0);
struct kbl_hdmi_pcm *pcm;
pcm = devm_kzalloc(rtd->card->dev, sizeof(*pcm), GFP_KERNEL);
if (!pcm)
return ... | [
1,
0
] |
Linux Kernel | sound/soc/intel/boards/kbl_rt5660.c |
static int kabylake_hdmi1_init(struct snd_soc_pcm_runtime *rtd) {
return kabylake_hdmi_init(rtd, KBL_DPCM_AUDIO_HDMI1_PB);
} | [
0,
0
] |
Linux Kernel | sound/soc/intel/boards/kbl_rt5660.c | static int kbl_fe_startup(struct snd_pcm_substream *substream) {
struct snd_pcm_runtime *runtime = substream->runtime;
runtime->hw.channels_max = DUAL_CHANNEL;
snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS,
&constraints_channels);
runtime->hw.formats = SNDRV_P... | [
0,
0
] |
Linux Kernel | sound/soc/intel/boards/kbl_rt5663_max98927.c |
static int
kabylake_rt5663_max98927_codec_init(struct snd_soc_pcm_runtime *rtd) {
int ret;
ret = kabylake_rt5663_codec_init(rtd);
if (ret)
return ret;
ret = snd_soc_dapm_ignore_suspend(&rtd->card->dapm, "SoC DMIC");
if (ret) {
dev_err(rtd->dev, "SoC DMIC ignore suspend failed %d\n", ret);
retur... | [
0,
0
] |
Linux Kernel | sound/soc/intel/boards/kbl_rt5663_max98927.c |
static int kabylake_hdmi3_init(struct snd_soc_pcm_runtime *rtd) {
return kabylake_hdmi_init(rtd, KBL_DPCM_AUDIO_HDMI3_PB);
} | [
0,
0
] |
Linux Kernel | sound/soc/intel/boards/kbl_rt5663_max98927.c | static int kabylake_ssp0_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;
int ret = 0, j;
for_each_rtd_codec_dais(rtd, j, codec_dai) {
if (... | [
0,
0
] |
Linux Kernel | sound/soc/intel/boards/kbl_rt5663_max98927.c |
static int kabylake_dmic_startup(struct snd_pcm_substream *substream) {
struct snd_pcm_runtime *runtime = substream->runtime;
runtime->hw.channels_max = DMIC_CH(dmic_constraints);
snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS,
dmic_constraints);
return snd_pc... | [
0,
0
] |
Linux Kernel | sound/soc/intel/boards/kbl_rt5663_max98927.c |
static int kabylake_refcap_startup(struct snd_pcm_substream *substream) {
substream->runtime->hw.channels_max = 1;
snd_pcm_hw_constraint_list(substream->runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS,
&constraints_refcap);
return snd_pcm_hw_constraint_list(
substream->runtime, 0, SND... | [
0,
0
] |
Linux Kernel | sound/soc/intel/boards/kbl_rt5663_max98927.c |
static int kabylake_audio_probe(struct platform_device *pdev) {
struct kbl_rt5663_private *ctx;
struct snd_soc_acpi_mach *mach;
int ret;
ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL);
if (!ctx)
return -ENOMEM;
INIT_LIST_HEAD(&ctx->hdmi_pcm_list);
kabylake_audio_card = (struct snd_soc_ca... | [
1,
0
] |
Linux Kernel | sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c | static int platform_clock_control(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *k, int event) {
struct snd_soc_dapm_context *dapm = w->dapm;
struct snd_soc_card *card = dapm->card;
struct kbl_codec_private *priv = snd_soc_card_get_drvdata(card);
int ret = 0;
switch (ev... | [
0,
0
] |
Linux Kernel | sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c |
static int kabylake_dmic_startup(struct snd_pcm_substream *substream) {
struct snd_pcm_runtime *runtime = substream->runtime;
runtime->hw.channels_max = DMIC_CH(dmic_constraints);
snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS,
dmic_constraints);
runtime->hw.f... | [
0,
0
] |
Linux Kernel | sound/soc/intel/boards/skl_hda_dsp_generic.c |
static int skl_hda_card_late_probe(struct snd_soc_card *card) {
return skl_hda_hdmi_jack_init(card);
} | [
0,
0
] |
Linux Kernel | sound/soc/intel/boards/skl_hda_dsp_generic.c | static void skl_set_hda_codec_autosuspend_delay(struct snd_soc_card *card) {
struct snd_soc_pcm_runtime *rtd;
struct hdac_hda_priv *hda_pvt;
struct snd_soc_dai *dai;
for_each_card_rtds(card, rtd) {
if (!strstr(rtd->dai_link->codecs->name, "ehdaudio0D0"))
continue;
dai = asoc_rtd_to_codec(rtd, 0);... | [
0,
0
] |
Linux Kernel | sound/soc/intel/boards/skl_hda_dsp_generic.c | static int skl_hda_audio_probe(struct platform_device *pdev) {
struct snd_soc_acpi_mach *mach;
struct skl_hda_private *ctx;
int ret;
dev_dbg(&pdev->dev, "entry\n");
ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL);
if (!ctx)
return -ENOMEM;
INIT_LIST_HEAD(&ctx->hdmi_pcm_list);
mach = pde... | [
1,
0
] |
Linux Kernel | sound/soc/intel/boards/skl_nau88l25_max98357a.c |
static int skylake_hdmi3_init(struct snd_soc_pcm_runtime *rtd) {
struct skl_nau8825_private *ctx = snd_soc_card_get_drvdata(rtd->card);
struct snd_soc_dai *dai = asoc_rtd_to_codec(rtd, 0);
struct skl_hdmi_pcm *pcm;
pcm = devm_kzalloc(rtd->card->dev, sizeof(*pcm), GFP_KERNEL);
if (!pcm)
return -ENOMEM;
... | [
1,
0
] |
Linux Kernel | sound/soc/intel/boards/skl_nau88l25_max98357a.c |
static int skylake_nau8825_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);
int ret;
ret = snd_soc_dai_set_syscl... | [
0,
0
] |
Linux Kernel | sound/soc/intel/boards/skl_nau88l25_ssm4567.c |
static int skylake_refcap_startup(struct snd_pcm_substream *substream) {
substream->runtime->hw.channels_max = 1;
snd_pcm_hw_constraint_list(substream->runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS,
&constraints_refcap);
return snd_pcm_hw_constraint_list(
substream->runtime, 0, SNDR... | [
0,
0
] |
Linux Kernel | sound/soc/intel/boards/skl_rt286.c | static int skl_fe_startup(struct snd_pcm_substream *substream) {
struct snd_pcm_runtime *runtime = substream->runtime;
runtime->hw.channels_max = 2;
snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS,
&constraints_channels);
runtime->hw.formats = SNDRV_PCM_FMTBIT_S... | [
0,
0
] |
Linux Kernel | sound/soc/intel/boards/sof_cs42l42.c | static int sof_hdmi_init(struct snd_soc_pcm_runtime *rtd) {
struct sof_card_private *ctx = snd_soc_card_get_drvdata(rtd->card);
struct snd_soc_dai *dai = asoc_rtd_to_codec(rtd, 0);
struct sof_hdmi_pcm *pcm;
pcm = devm_kzalloc(rtd->card->dev, sizeof(*pcm), GFP_KERNEL);
if (!pcm)
return -ENOMEM;
pcm->de... | [
1,
0
] |
Linux Kernel | sound/soc/intel/boards/sof_cs42l42.c | static int dmic_init(struct snd_soc_pcm_runtime *rtd) {
struct snd_soc_card *card = rtd->card;
int ret;
ret = snd_soc_dapm_new_controls(&card->dapm, dmic_widgets,
ARRAY_SIZE(dmic_widgets));
if (ret) {
dev_err(card->dev, "DMic widget addition failed: %d\n", ret);
retur... | [
0,
0
] |
Linux Kernel | sound/soc/intel/boards/sof_cs42l42.c | static int create_hdmi_dai_links(struct device *dev,
struct snd_soc_dai_link *links,
struct snd_soc_dai_link_component *cpus,
int *id, int hdmi_num) {
struct snd_soc_dai_link_component *idisp_components;
int i;
if ... | [
1,
0
] |
Linux Kernel | sound/soc/intel/boards/sof_da7219_max98373.c | static int audio_probe(struct platform_device *pdev) {
static struct snd_soc_card *card;
struct snd_soc_acpi_mach *mach;
struct card_private *ctx;
int ret;
ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL);
if (!ctx)
return -ENOMEM;
if (!strcmp(pdev->name, "sof_da7219_mx98360a")) {
dais[0... | [
1,
0
] |
Linux Kernel | sound/soc/intel/boards/sof_es8336.c |
static int dmic_init(struct snd_soc_pcm_runtime *runtime) {
struct snd_soc_card *card = runtime->card;
int ret;
ret = snd_soc_dapm_new_controls(&card->dapm, dmic_widgets,
ARRAY_SIZE(dmic_widgets));
if (ret) {
dev_err(card->dev, "DMic widget addition failed: %d\n", ret);
... | [
0,
0
] |
Linux Kernel | sound/soc/intel/boards/sof_es8336.c |
static int sof_es8316_init(struct snd_soc_pcm_runtime *runtime) {
struct snd_soc_component *codec = asoc_rtd_to_codec(runtime, 0)->component;
struct snd_soc_card *card = runtime->card;
struct sof_es8336_private *priv = snd_soc_card_get_drvdata(card);
const struct snd_soc_dapm_route *custom_map;
int num_route... | [
0,
0
] |
Linux Kernel | sound/soc/intel/boards/sof_es8336.c |
static int sof_es8336_remove(struct platform_device *pdev) {
struct snd_soc_card *card = platform_get_drvdata(pdev);
struct sof_es8336_private *priv = snd_soc_card_get_drvdata(card);
cancel_delayed_work(&priv->pcm_pop_work);
gpiod_put(priv->gpio_speakers);
device_remove_software_node(priv->codec_dev);
put... | [
0,
0
] |
Linux Kernel | sound/soc/intel/boards/sof_maxim_common.c | static int max_98373_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;
int j;
for_each_rtd_codec_dais(rtd, j, codec_dai) {
if (!strcmp(codec_dai... | [
0,
0
] |
Linux Kernel | sound/soc/intel/boards/sof_maxim_common.c |
void max_98373_set_codec_conf(struct snd_soc_card *card) {
card->codec_conf = max_98373_codec_conf;
card->num_configs = ARRAY_SIZE(max_98373_codec_conf);
} | [
0,
0
] |
Linux Kernel | sound/soc/intel/boards/sof_nau8825.c | static int sof_hdmi_init(struct snd_soc_pcm_runtime *rtd) {
struct sof_card_private *ctx = snd_soc_card_get_drvdata(rtd->card);
struct snd_soc_dai *dai = asoc_rtd_to_codec(rtd, 0);
struct sof_hdmi_pcm *pcm;
pcm = devm_kzalloc(rtd->card->dev, sizeof(*pcm), GFP_KERNEL);
if (!pcm)
return -ENOMEM;
pcm->de... | [
1,
0
] |
Linux Kernel | sound/soc/intel/boards/sof_nau8825.c | static int sof_card_late_probe(struct snd_soc_card *card) {
struct sof_card_private *ctx = snd_soc_card_get_drvdata(card);
struct snd_soc_dapm_context *dapm = &card->dapm;
struct sof_hdmi_pcm *pcm;
int err;
if (sof_nau8825_quirk & SOF_MAX98373_SPEAKER_AMP_PRESENT) {
snd_soc_dapm_disable_pin(dapm, "Left ... | [
0,
0
] |
Linux Kernel | sound/soc/intel/boards/sof_realtek_common.c |
void sof_rt1015_codec_conf(struct snd_soc_card *card) {
card->codec_conf = rt1015_amp_conf;
card->num_configs = ARRAY_SIZE(rt1015_amp_conf);
} | [
0,
0
] |
Linux Kernel | sound/soc/intel/boards/sof_realtek_common.c |
static int rt1019p_init(struct snd_soc_pcm_runtime *rtd) {
struct snd_soc_card *card = rtd->card;
int ret;
ret = snd_soc_dapm_add_routes(&card->dapm, rt1019p_dapm_routes,
ARRAY_SIZE(rt1019p_dapm_routes));
if (ret) {
dev_err(rtd->dev, "Speaker map addition failed: %d\n", ret... | [
0,
0
] |
Linux Kernel | sound/soc/intel/boards/sof_rt5682.c |
static void sof_rt5682_codec_exit(struct snd_soc_pcm_runtime *rtd) {
struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component;
snd_soc_component_set_jack(component, NULL, NULL);
} | [
0,
0
] |
Linux Kernel | sound/soc/intel/boards/sof_rt5682.c | static int sof_card_late_probe(struct snd_soc_card *card) {
struct sof_card_private *ctx = snd_soc_card_get_drvdata(card);
struct snd_soc_component *component = NULL;
struct snd_soc_dapm_context *dapm = &card->dapm;
char jack_name[NAME_SIZE];
struct sof_hdmi_pcm *pcm;
int err;
if (sof_rt5682_quirk & SOF_... | [
1,
0
] |
Linux Kernel | sound/soc/intel/boards/sof_sdw.c |
static void log_quirks(struct device *dev) {
if (SOF_RT711_JDSRC(sof_sdw_quirk))
dev_dbg(dev, "quirk realtek,jack-detect-source %ld\n",
SOF_RT711_JDSRC(sof_sdw_quirk));
if (sof_sdw_quirk & SOF_SDW_FOUR_SPK)
dev_dbg(dev, "quirk SOF_SDW_FOUR_SPK enabled\n");
if (sof_sdw_quirk & SOF_SDW_TGL_HDMI... | [
1,
0
] |
Linux Kernel | sound/soc/intel/boards/sof_sdw.c | int sdw_startup(struct snd_pcm_substream *substream) {
return sdw_startup_stream(substream);
} | [
0,
0
] |
Linux Kernel | sound/soc/intel/boards/sof_sdw.c | static inline int find_codec_info_part(u64 adr) {
unsigned int part_id, sdw_version;
int i;
part_id = SDW_PART_ID(adr);
sdw_version = SDW_VERSION(adr);
for (i = 0; i < ARRAY_SIZE(codec_info_list); i++)
if (part_id == codec_info_list[i].part_id &&
(!codec_info_list[i].version_id ||
sdw_v... | [
0,
0
] |
Linux Kernel | sound/soc/intel/boards/sof_sdw.c |
static inline int find_codec_info_acpi(const u8 *acpi_id) {
int i;
if (!acpi_id[0])
return -EINVAL;
for (i = 0; i < ARRAY_SIZE(codec_info_list); i++)
if (!memcmp(codec_info_list[i].acpi_id, acpi_id, ACPI_ID_LEN))
break;
if (i == ARRAY_SIZE(codec_info_list))
return -EINVAL;
return i;
} | [
0,
0
] |
Linux Kernel | sound/soc/intel/boards/sof_sdw.c |
static int sof_sdw_card_late_probe(struct snd_soc_card *card) {
struct mc_private *ctx = snd_soc_card_get_drvdata(card);
int ret = 0;
int i;
for (i = 0; i < ARRAY_SIZE(codec_info_list); i++) {
if (!codec_info_list[i].late_probe)
continue;
ret = codec_info_list[i].codec_card_late_probe(card);
... | [
0,
0
] |
Linux Kernel | sound/soc/intel/boards/sof_sdw.c | static void mc_dailink_exit_loop(struct snd_soc_card *card) {
struct snd_soc_dai_link *link;
int ret;
int i, j;
for (i = 0; i < ARRAY_SIZE(codec_info_list); i++) {
if (!codec_info_list[i].exit)
continue;
for_each_card_prelinks(card, j, link) {
if (!strcmp(link->codecs[0].dai_name, codec_in... | [
0,
0
] |
Linux Kernel | sound/soc/intel/boards/sof_sdw.c |
static int mc_remove(struct platform_device *pdev) {
struct snd_soc_card *card = platform_get_drvdata(pdev);
mc_dailink_exit_loop(card);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/intel/boards/sof_sdw_max98373.c |
static int spk_init(struct snd_soc_pcm_runtime *rtd) {
struct snd_soc_card *card = rtd->card;
int ret;
card->components =
devm_kasprintf(card->dev, GFP_KERNEL, "%s spk:mx8373", card->components);
if (!card->components)
return -ENOMEM;
ret = snd_soc_add_card_controls(card, mx8373_controls,
... | [
0,
0
] |
Linux Kernel | sound/soc/intel/boards/sof_sdw_rt1308.c | static int rt1308_i2s_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_card *card = rtd->card;
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
int clk_i... | [
0,
0
] |
Linux Kernel | sound/soc/intel/boards/sof_sdw_rt1308.c |
int sof_sdw_rt1308_exit(struct snd_soc_card *card,
struct snd_soc_dai_link *dai_link) {
struct mc_private *ctx = snd_soc_card_get_drvdata(card);
if (ctx->amp_dev1) {
device_remove_software_node(ctx->amp_dev1);
put_device(ctx->amp_dev1);
}
if (ctx->amp_dev2) {
device_remove... | [
0,
0
] |
Linux Kernel | sound/soc/intel/boards/sof_sdw_rt1316.c | int sof_sdw_rt1316_init(struct snd_soc_card *card,
const struct snd_soc_acpi_link_adr *link,
struct snd_soc_dai_link *dai_links,
struct sof_sdw_codec_info *info, bool playback) {
struct mc_private *ctx = snd_soc_card_get_drvdata(card);
struct d... | [
0,
0
] |
Linux Kernel | sound/soc/intel/boards/sof_sdw_rt1318.c | int sof_sdw_rt1318_init(struct snd_soc_card *card,
const struct snd_soc_acpi_link_adr *link,
struct snd_soc_dai_link *dai_links,
struct sof_sdw_codec_info *info, bool playback) {
if (!playback)
return 0;
info->amp_num++;
if (info->amp_n... | [
0,
0
] |
Linux Kernel | sound/soc/intel/boards/sof_sdw_rt711.c |
int sof_sdw_rt711_exit(struct snd_soc_card *card,
struct snd_soc_dai_link *dai_link) {
struct mc_private *ctx = snd_soc_card_get_drvdata(card);
if (!ctx->headset_codec_dev)
return 0;
device_remove_software_node(ctx->headset_codec_dev);
put_device(ctx->headset_codec_dev);
return ... | [
0,
0
] |
Linux Kernel | sound/soc/intel/boards/sof_wm8804.c |
static int sof_wm8804_quirk_cb(const struct dmi_system_id *id) {
sof_wm8804_quirk = (unsigned long)id->driver_data;
return 1;
} | [
0,
0
] |
Linux Kernel | sound/soc/intel/catpt/device.c |
static int __maybe_unused catpt_suspend(struct device *dev) {
struct catpt_dev *cdev = dev_get_drvdata(dev);
struct dma_chan *chan;
int ret;
chan = catpt_dma_request_config_chan(cdev);
if (IS_ERR(chan))
return PTR_ERR(chan);
memset(&cdev->dx_ctx, 0, sizeof(cdev->dx_ctx));
ret = catpt_ipc_enter_dxst... | [
1,
0
] |
Linux Kernel | sound/soc/intel/catpt/dsp.c | static int catpt_dma_memcpy(struct catpt_dev *cdev, struct dma_chan *chan,
dma_addr_t dst_addr, dma_addr_t src_addr,
size_t size) {
struct dma_async_tx_descriptor *desc;
enum dma_status status;
int ret;
desc =
dmaengine_prep_dma_memcpy(chan, dst_add... | [
0,
0
] |
Linux Kernel | sound/soc/intel/catpt/dsp.c |
int catpt_dma_memcpy_fromdsp(struct catpt_dev *cdev, struct dma_chan *chan,
dma_addr_t dst_addr, dma_addr_t src_addr,
size_t size) {
return catpt_dma_memcpy(cdev, chan, dst_addr,
src_addr | CATPT_DMA_DSP_ADDR_MASK, size);
} | [
0,
0
] |
Linux Kernel | sound/soc/intel/catpt/dsp.c | void catpt_dmac_remove(struct catpt_dev *cdev) { dw_dma_remove(cdev->dmac); } | [
0,
0
] |
Linux Kernel | sound/soc/intel/catpt/dsp.c | void catpt_dsp_update_srampge(struct catpt_dev *cdev, struct resource *sram,
unsigned long mask) {
struct resource *res;
unsigned long new = 0;
for (res = sram->child; res; res = res->sibling) {
u32 h, l;
h = (res->end - sram->start) / CATPT_MEMBLOCK_SIZE;
l = (res->sta... | [
1,
0
] |
Linux Kernel | sound/soc/intel/catpt/dsp.c |
void lpt_dsp_pll_shutdown(struct catpt_dev *cdev, bool enable) {
u32 val;
val = enable ? LPT_VDRTCTL0_APLLSE : 0;
catpt_updatel_pci(cdev, VDRTCTL0, LPT_VDRTCTL0_APLLSE, val);
} | [
0,
0
] |
Linux Kernel | sound/soc/intel/catpt/dsp.c | int catpt_dsp_power_up(struct catpt_dev *cdev) {
u32 mask, val;
catpt_updatel_pci(cdev, VDRTCTL2, CATPT_VDRTCTL2_DCLCGE, 0);
/* switch clock gating */
mask = CATPT_VDRTCTL2_CGEALL & (~CATPT_VDRTCTL2_DCLCGE);
val = mask & (~CATPT_VDRTCTL2_DTCGE);
catpt_updatel_pci(cdev, VDRTCTL2, mask, val);
catpt_updat... | [
1,
0
] |
Linux Kernel | sound/soc/intel/catpt/ipc.c | static int catpt_wait_msg_completion(struct catpt_dev *cdev, int timeout) {
struct catpt_ipc *ipc = &cdev->ipc;
int ret;
ret = wait_for_completion_timeout(&ipc->done_completion,
msecs_to_jiffies(timeout));
if (!ret)
return -ETIMEDOUT;
if (ipc->rx.rsp.status != CATPT_RE... | [
0,
0
] |
Linux Kernel | sound/soc/intel/catpt/ipc.c | static int catpt_dsp_do_send_msg(struct catpt_dev *cdev,
struct catpt_ipc_msg request,
struct catpt_ipc_msg *reply, int timeout) {
struct catpt_ipc *ipc = &cdev->ipc;
unsigned long flags;
int ret;
if (!ipc->ready)
return -EPERM;
if (reques... | [
1,
1
] |
Linux Kernel | sound/soc/intel/catpt/ipc.c |
int catpt_dsp_send_msg(struct catpt_dev *cdev, struct catpt_ipc_msg request,
struct catpt_ipc_msg *reply) {
return catpt_dsp_send_msg_timeout(cdev, request, reply,
cdev->ipc.default_timeout);
} | [
0,
0
] |
Linux Kernel | sound/soc/intel/catpt/ipc.c |
static void catpt_dsp_notify_stream(struct catpt_dev *cdev,
union catpt_notify_msg msg) {
struct catpt_stream_runtime *stream;
struct catpt_notify_position pos;
struct catpt_notify_glitch glitch;
stream = catpt_stream_find(cdev, msg.stream_hw_id);
if (!stream) {
dev_w... | [
1,
0
] |
Linux Kernel | sound/soc/intel/catpt/ipc.c |
static void catpt_dsp_copy_rx(struct catpt_dev *cdev, u32 header) {
struct catpt_ipc *ipc = &cdev->ipc;
ipc->rx.header = header;
if (ipc->rx.rsp.status != CATPT_REPLY_SUCCESS)
return;
memcpy_fromio(ipc->rx.data, catpt_outbox_addr(cdev), ipc->rx.size);
trace_catpt_ipc_payload(ipc->rx.data, ipc->rx.size)... | [
0,
0
] |
Linux Kernel | sound/soc/intel/catpt/ipc.c | static void catpt_dsp_process_response(struct catpt_dev *cdev, u32 header) {
union catpt_notify_msg msg = CATPT_MSG(header);
struct catpt_ipc *ipc = &cdev->ipc;
if (msg.fw_ready) {
struct catpt_fw_ready config;
u32 off = msg.mailbox_address << 3;
memcpy_fromio(&config, cdev->lpe_ba + off, sizeof(co... | [
1,
1
] |
Linux Kernel | sound/soc/intel/catpt/loader.c |
void catpt_sram_free(struct resource *sram) {
struct resource *res, *save;
for (res = sram->child; res;) {
save = res->sibling;
release_resource(res);
kfree(res);
res = save;
}
} | [
0,
0
] |
Linux Kernel | sound/soc/intel/catpt/loader.c |
static int catpt_restore_memdumps(struct catpt_dev *cdev,
struct dma_chan *chan) {
int i;
for (i = 0; i < cdev->dx_ctx.num_meminfo; i++) {
struct catpt_save_meminfo *info;
u32 off;
int ret;
info = &cdev->dx_ctx.meminfo[i];
if (info->source != CATPT_DX_TYPE_ME... | [
1,
0
] |
Linux Kernel | sound/soc/intel/catpt/loader.c | static int catpt_restore_fwimage(struct catpt_dev *cdev, struct dma_chan *chan,
dma_addr_t paddr,
struct catpt_fw_block_hdr *blk) {
struct resource r1, r2, common;
int i;
print_hex_dump_debug(__func__, DUMP_PREFIX_OFFSET, 8, 4, blk, sizeof(*blk),
... | [
1,
0
] |
Linux Kernel | sound/soc/intel/catpt/loader.c | static int catpt_load_module(struct catpt_dev *cdev, struct dma_chan *chan,
dma_addr_t paddr, struct catpt_fw_mod_hdr *mod) {
struct catpt_module_type *type;
u32 offset = sizeof(*mod);
int i;
print_hex_dump_debug(__func__, DUMP_PREFIX_OFFSET, 8, 4, mod, sizeof(*mod),
... | [
1,
0
] |
Linux Kernel | sound/soc/intel/catpt/loader.c |
static int catpt_restore_firmware(struct catpt_dev *cdev, struct dma_chan *chan,
dma_addr_t paddr, struct catpt_fw_hdr *fw) {
u32 offset = sizeof(*fw);
int i;
print_hex_dump_debug(__func__, DUMP_PREFIX_OFFSET, 8, 4, fw, sizeof(*fw),
false);
for (i = 0;... | [
1,
0
] |
Linux Kernel | sound/soc/intel/catpt/messages.c |
int catpt_ipc_free_stream(struct catpt_dev *cdev, u8 stream_hw_id) {
union catpt_global_msg msg = CATPT_GLOBAL_MSG(FREE_STREAM);
struct catpt_ipc_msg request;
int ret;
request.header = msg.val;
request.size = sizeof(stream_hw_id);
request.data = &stream_hw_id;
ret = catpt_dsp_send_msg(cdev, request, NU... | [
1,
0
] |
Linux Kernel | sound/soc/intel/catpt/messages.c |
int catpt_ipc_set_device_format(struct catpt_dev *cdev,
struct catpt_ssp_device_format *devfmt) {
union catpt_global_msg msg = CATPT_GLOBAL_MSG(SET_DEVICE_FORMATS);
struct catpt_ipc_msg request;
int ret;
request.header = msg.val;
request.size = sizeof(*devfmt);
request.data... | [
1,
0
] |
Linux Kernel | sound/soc/intel/catpt/messages.c |
int catpt_ipc_reset_stream(struct catpt_dev *cdev, u8 stream_hw_id) {
union catpt_stream_msg msg = CATPT_STREAM_MSG(RESET_STREAM);
struct catpt_ipc_msg request = {{0}};
int ret;
msg.stream_hw_id = stream_hw_id;
request.header = msg.val;
ret = catpt_dsp_send_msg(cdev, request, NULL);
if (ret)
dev_er... | [
0,
0
] |
Linux Kernel | sound/soc/intel/catpt/pcm.c | static struct catpt_stream_template *
catpt_get_stream_template(struct snd_pcm_substream *substream) {
struct snd_soc_pcm_runtime *rtm = asoc_substream_to_rtd(substream);
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtm, 0);
enum catpt_stream_type type;
type = cpu_dai->driver->id;
switch (type) {
case CA... | [
0,
0
] |
Linux Kernel | sound/soc/intel/catpt/pcm.c | static int catpt_dai_apply_usettings(struct snd_soc_dai *dai,
struct catpt_stream_runtime *stream) {
struct snd_soc_component *component = dai->component;
struct snd_kcontrol *pos;
struct catpt_dev *cdev = dev_get_drvdata(dai->dev);
const char *name;
int ret;
u32 id = st... | [
1,
0
] |
Linux Kernel | sound/soc/intel/catpt/pcm.c |
static int catpt_dai_hw_free(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai) {
struct catpt_stream_runtime *stream;
struct catpt_dev *cdev = dev_get_drvdata(dai->dev);
stream = snd_soc_dai_get_dma_data(dai, substream);
if (!stream->allocated)
return 0;
catpt_i... | [
0,
0
] |
Linux Kernel | sound/soc/intel/catpt/pcm.c |
static int catpt_component_pcm_construct(struct snd_soc_component *component,
struct snd_soc_pcm_runtime *rtm) {
struct catpt_dev *cdev = dev_get_drvdata(component->dev);
snd_pcm_set_managed_buffer_all(rtm->pcm, SNDRV_DMA_TYPE_DEV_SG, cdev->dev,
... | [
0,
0
] |
Linux Kernel | sound/soc/intel/catpt/pcm.c |
static int catpt_component_open(struct snd_soc_component *component,
struct snd_pcm_substream *substream) {
struct snd_soc_pcm_runtime *rtm = asoc_substream_to_rtd(substream);
if (!rtm->dai_link->no_pcm)
snd_soc_set_runtime_hwparams(substream, &catpt_pcm_hardware);
return 0;
... | [
1,
0
] |
Linux Kernel | sound/soc/intel/catpt/pcm.c | static int catpt_dai_pcm_new(struct snd_soc_pcm_runtime *rtm,
struct snd_soc_dai *dai) {
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtm, 0);
struct catpt_ssp_device_format devfmt;
struct catpt_dev *cdev = dev_get_drvdata(dai->dev);
int ret;
devfmt.iface = dai->driver->id;
... | [
1,
0
] |
Linux Kernel | sound/soc/intel/catpt/pcm.c |
static int catpt_set_dspvol(struct catpt_dev *cdev, u8 stream_id,
long *ctlvol) {
u32 dspvol;
int ret, i;
for (i = 1; i < CATPT_CHANNELS_MAX; i++)
if (ctlvol[i] != ctlvol[0])
break;
if (i == CATPT_CHANNELS_MAX) {
dspvol = ctlvol_to_dspvol(ctlvol[0]);
ret = catpt... | [
0,
0
] |
Linux Kernel | sound/soc/intel/catpt/pcm.c |
static int catpt_volume_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo) {
uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
uinfo->count = CATPT_CHANNELS_MAX;
uinfo->value.integer.min = 0;
uinfo->value.integer.max = DSP_VOLUME_STEP_MAX;
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/intel/catpt/pcm.c |
static int catpt_capture_volume_put(struct snd_kcontrol *kctl,
struct snd_ctl_elem_value *uctl) {
return catpt_stream_volume_put(kctl, uctl, CATPT_PIN_ID_CAPTURE1);
} | [
0,
0
] |
Linux Kernel | sound/soc/intel/catpt/pcm.c |
static int catpt_waves_param_get(struct snd_kcontrol *kcontrol,
unsigned int __user *bytes,
unsigned int size) {
return 0;
} | [
0,
0
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.