Projectname large_stringclasses 15
values | Filepath large_stringlengths 4 106 ⌀ | Function large_stringlengths 11 3.45k | Label list |
|---|---|---|---|
Linux Kernel | sound/soc/tegra/tegra30_ahub.c |
int tegra30_ahub_free_rx_fifo(enum tegra30_ahub_rxcif rxcif) {
int channel = rxcif - TEGRA30_AHUB_RXCIF_APBIF_RX0;
__clear_bit(channel, ahub->rx_usage);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/tegra/tegra30_ahub.c |
int tegra30_ahub_enable_tx_fifo(enum tegra30_ahub_txcif txcif) {
int channel = txcif - TEGRA30_AHUB_TXCIF_APBIF_TX0;
int reg, val;
pm_runtime_get_sync(ahub->dev);
reg =
TEGRA30_AHUB_CHANNEL_CTRL + (channel * TEGRA30_AHUB_CHANNEL_CTRL_STRIDE);
val = tegra30_apbif_read(reg);
val |= TEGRA30_AHUB_CHANN... | [
0,
0
] |
Linux Kernel | sound/soc/tegra/tegra30_ahub.c |
int tegra30_ahub_free_tx_fifo(enum tegra30_ahub_txcif txcif) {
int channel = txcif - TEGRA30_AHUB_TXCIF_APBIF_TX0;
__clear_bit(channel, ahub->tx_usage);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/tegra/tegra30_ahub.c |
static bool tegra30_ahub_apbif_volatile_reg(struct device *dev,
unsigned int reg) {
switch (reg) {
case TEGRA30_AHUB_CONFIG_LINK_CTRL:
case TEGRA30_AHUB_MISC_CTRL:
case TEGRA30_AHUB_APBDMA_LIVE_STATUS:
case TEGRA30_AHUB_I2S_LIVE_STATUS:
case TEGRA30_AHUB_SPDIF_LI... | [
0,
0
] |
Linux Kernel | sound/soc/tegra/tegra30_i2s.c |
static __maybe_unused int tegra30_i2s_runtime_suspend(struct device *dev) {
struct tegra30_i2s *i2s = dev_get_drvdata(dev);
regcache_cache_only(i2s->regmap, true);
clk_disable_unprepare(i2s->clk_i2s);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/tegra/tegra30_i2s.c |
static void tegra30_i2s_start_playback(struct tegra30_i2s *i2s) {
tegra30_ahub_enable_tx_fifo(i2s->playback_fifo_cif);
regmap_update_bits(i2s->regmap, TEGRA30_I2S_CTRL, TEGRA30_I2S_CTRL_XFER_EN_TX,
TEGRA30_I2S_CTRL_XFER_EN_TX);
} | [
0,
0
] |
Linux Kernel | sound/soc/tegra/tegra30_i2s.c |
static void tegra30_i2s_stop_playback(struct tegra30_i2s *i2s) {
tegra30_ahub_disable_tx_fifo(i2s->playback_fifo_cif);
regmap_update_bits(i2s->regmap, TEGRA30_I2S_CTRL, TEGRA30_I2S_CTRL_XFER_EN_TX,
0);
} | [
0,
0
] |
Linux Kernel | sound/soc/tegra/tegra30_i2s.c |
static bool tegra30_i2s_volatile_reg(struct device *dev, unsigned int reg) {
switch (reg) {
case TEGRA30_I2S_FLOW_STATUS:
case TEGRA30_I2S_FLOW_TOTAL:
case TEGRA30_I2S_FLOW_OVER:
case TEGRA30_I2S_FLOW_UNDER:
return true;
default:
return false;
}
} | [
0,
0
] |
Linux Kernel | sound/soc/tegra/tegra_asoc_machine.c |
static int tegra_machine_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *k, int event) {
struct snd_soc_dapm_context *dapm = w->dapm;
struct tegra_machine *machine = snd_soc_card_get_drvdata(dapm->card);
if (!strcmp(w->name, "Int Spk") || !strcmp(w->name, "Speakers"))
... | [
0,
0
] |
Linux Kernel | sound/soc/tegra/tegra_asoc_machine.c |
static unsigned int tegra_machine_mclk_rate_512(unsigned int srate) {
return 512 * srate;
} | [
0,
0
] |
Linux Kernel | sound/soc/tegra/tegra_asoc_machine.c |
static unsigned int tegra_machine_mclk_rate_12mhz(unsigned int srate) {
unsigned int mclk;
switch (srate) {
case 8000:
case 16000:
case 24000:
case 32000:
case 48000:
case 64000:
case 96000:
mclk = 12288000;
break;
case 11025:
case 22050:
case 44100:
case 88200:
mclk = 11289600;
... | [
0,
0
] |
Linux Kernel | sound/soc/tegra/tegra_asoc_machine.c |
static struct device_node *tegra_machine_parse_phandle(struct device *dev,
const char *name) {
struct device_node *np;
int err;
np = of_parse_phandle(dev->of_node, name, 0);
if (!np) {
dev_err(dev, "Property '%s' missing or invalid\n", name);
retu... | [
0,
0
] |
Linux Kernel | sound/soc/tegra/tegra_asoc_machine.c |
static int tegra_machine_register_codec(struct device *dev, const char *name) {
struct platform_device *pdev;
int err;
if (!name)
return 0;
pdev = platform_device_register_simple(name, -1, NULL, 0);
if (IS_ERR(pdev))
return PTR_ERR(pdev);
err = devm_add_action_or_reset(dev, tegra_machine_unregis... | [
0,
0
] |
Linux Kernel | sound/soc/tegra/tegra_asoc_machine.c | static int tegra_wm9712_init(struct snd_soc_pcm_runtime *rtd) {
return snd_soc_dapm_force_enable_pin(&rtd->card->dapm, "Mic Bias");
} | [
0,
0
] |
Linux Kernel | sound/soc/tegra/tegra_cif.h |
static inline void tegra_set_cif(struct regmap *regmap, unsigned int reg,
struct tegra_cif_conf *conf) {
unsigned int value;
value = (conf->threshold << TEGRA_ACIF_CTRL_FIFO_TH_SHIFT) |
((conf->audio_ch - 1) << TEGRA_ACIF_CTRL_AUDIO_CH_SHIFT) |
((conf->client_c... | [
1,
0
] |
Linux Kernel | sound/soc/tegra/tegra_pcm.c |
int tegra_pcm_platform_register_with_chan_names(
struct device *dev, struct snd_dmaengine_pcm_config *config,
char *txdmachan, char *rxdmachan) {
*config = tegra_dmaengine_pcm_config;
config->dma_dev = dev->parent;
config->chan_names[0] = txdmachan;
config->chan_names[1] = rxdmachan;
return snd_dmae... | [
0,
0
] |
Linux Kernel | sound/soc/tegra/tegra_pcm.c | int tegra_pcm_open(struct snd_soc_component *component,
struct snd_pcm_substream *substream) {
struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct snd_dmaengine_dai_dma_data *dmap;
struct dma_chan *chan;
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
int ret;
if (rt... | [
0,
0
] |
Linux Kernel | sound/soc/tegra/tegra_pcm.c |
snd_pcm_uframes_t tegra_pcm_pointer(struct snd_soc_component *component,
struct snd_pcm_substream *substream) {
return snd_dmaengine_pcm_pointer(substream);
} | [
0,
0
] |
Linux Kernel | sound/soc/tegra/tegra_pcm.c |
static int tegra_pcm_dma_allocate(struct device *dev,
struct snd_soc_pcm_runtime *rtd,
size_t size) {
struct snd_pcm *pcm = rtd->pcm;
int ret;
ret = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32));
if (ret < 0)
return ret;
return snd_... | [
0,
0
] |
Linux Kernel | sound/soc/tegra/tegra_pcm.c | int tegra_pcm_construct(struct snd_soc_component *component,
struct snd_soc_pcm_runtime *rtd) {
struct device *dev = component->dev;
if (!of_get_property(dev->of_node, "iommus", NULL))
dev = rtd->card->snd_card->dev;
return tegra_pcm_dma_allocate(dev, rtd, tegra_pcm_hardware.buffer_b... | [
0,
0
] |
Linux Kernel | sound/soc/tegra/tegra_wm8903.c | static int tegra_wm8903_init(struct snd_soc_pcm_runtime *rtd) {
struct tegra_machine *machine = snd_soc_card_get_drvdata(rtd->card);
struct snd_soc_card *card = rtd->card;
int err;
if (machine->asoc->hp_jack_gpio_active_low) {
bool active_low = gpiod_is_active_low(machine->gpiod_hp_det);
machine->hp_j... | [
1,
0
] |
Linux Kernel | sound/soc/ti/ams-delta.c | static void cx81801_close(struct tty_struct *tty) {
struct snd_soc_component *component = tty->disc_data;
struct snd_soc_dapm_context *dapm = &component->card->dapm;
del_timer_sync(&cx81801_timer);
INIT_LIST_HEAD(&ams_delta_hook_switch.pins);
if (!component)
return;
v253_ops.close(tty);
/* Revert... | [
0,
0
] |
Linux Kernel | sound/soc/ti/ams-delta.c | static void cx81801_hangup(struct tty_struct *tty) { cx81801_close(tty); } | [
0,
0
] |
Linux Kernel | sound/soc/ti/ams-delta.c | static void cx81801_receive(struct tty_struct *tty, const unsigned char *cp,
const char *fp, int count) {
struct snd_soc_component *component = tty->disc_data;
const unsigned char *c;
int apply, ret;
if (!component)
return;
if (!component->card->pop_time) {
/* Initialize... | [
1,
0
] |
Linux Kernel | sound/soc/ti/ams-delta.c | static void cx81801_wakeup(struct tty_struct *tty) {
v253_ops.write_wakeup(tty);
} | [
0,
0
] |
Linux Kernel | sound/soc/ti/ams-delta.c |
static int ams_delta_mute(struct snd_soc_dai *dai, int mute, int direction) {
int apply;
if (ams_delta_muted == mute)
return 0;
spin_lock_bh(&ams_delta_lock);
ams_delta_muted = mute;
apply = !cx81801_cmd_pending;
spin_unlock_bh(&ams_delta_lock);
if (apply)
gpiod_set_value(gpiod_modem_codec, !!... | [
0,
0
] |
Linux Kernel | sound/soc/ti/davinci-evm.c |
static void __exit evm_exit(void) {
#if defined(CONFIG_OF)
if (of_have_populated_dt()) {
platform_driver_unregister(&davinci_evm_driver);
return;
}
#endif
platform_device_unregister(evm_snd_device);
} | [
0,
0
] |
Linux Kernel | sound/soc/ti/davinci-i2s.c |
static inline void davinci_mcbsp_write_reg(struct davinci_mcbsp_dev *dev,
int reg, u32 val) {
__raw_writel(val, dev->base + reg);
} | [
0,
0
] |
Linux Kernel | sound/soc/ti/davinci-i2s.c |
static int davinci_i2s_dai_set_clkdiv(struct snd_soc_dai *cpu_dai, int div_id,
int div) {
struct davinci_mcbsp_dev *dev = snd_soc_dai_get_drvdata(cpu_dai);
if (div_id != DAVINCI_MCBSP_CLKGDV)
return -ENODEV;
dev->clk_div = div;
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/ti/davinci-i2s.c |
static int davinci_i2s_remove(struct platform_device *pdev) {
struct davinci_mcbsp_dev *dev = dev_get_drvdata(&pdev->dev);
snd_soc_unregister_component(&pdev->dev);
clk_disable(dev->clk);
clk_put(dev->clk);
dev->clk = NULL;
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/ti/davinci-mcasp.c |
static inline void mcasp_clr_bits(struct davinci_mcasp *mcasp, u32 offset,
u32 val) {
void __iomem *reg = mcasp->base + offset;
__raw_writel((__raw_readl(reg) & ~(val)), reg);
} | [
0,
0
] |
Linux Kernel | sound/soc/ti/davinci-mcasp.c |
static inline void mcasp_mod_bits(struct davinci_mcasp *mcasp, u32 offset,
u32 val, u32 mask) {
void __iomem *reg = mcasp->base + offset;
__raw_writel((__raw_readl(reg) & ~mask) | val, reg);
} | [
0,
0
] |
Linux Kernel | sound/soc/ti/davinci-mcasp.c |
static bool mcasp_is_synchronous(struct davinci_mcasp *mcasp) {
u32 rxfmctl = mcasp_get_reg(mcasp, DAVINCI_MCASP_RXFMCTL_REG);
u32 aclkxctl = mcasp_get_reg(mcasp, DAVINCI_MCASP_ACLKXCTL_REG);
return !(aclkxctl & TX_ASYNC) && rxfmctl & AFSRE;
} | [
0,
0
] |
Linux Kernel | sound/soc/ti/davinci-mcasp.c | static void mcasp_start_rx(struct davinci_mcasp *mcasp) {
if (mcasp->rxnumevt) {
u32 reg = mcasp->fifo_base + MCASP_RFIFOCTL_OFFSET;
mcasp_clr_bits(mcasp, reg, FIFO_ENABLE);
mcasp_set_bits(mcasp, reg, FIFO_ENABLE);
}
/* Start clocks */
mcasp_set_ctl_reg(mcasp, DAVINCI_MCASP_GBLCTLR_REG, RXHCLKRST)... | [
0,
0
] |
Linux Kernel | sound/soc/ti/davinci-mcasp.c | static void mcasp_start_tx(struct davinci_mcasp *mcasp) {
u32 cnt;
if (mcasp->txnumevt) {
u32 reg = mcasp->fifo_base + MCASP_WFIFOCTL_OFFSET;
mcasp_clr_bits(mcasp, reg, FIFO_ENABLE);
mcasp_set_bits(mcasp, reg, FIFO_ENABLE);
}
/* Start clocks */
mcasp_set_ctl_reg(mcasp, DAVINCI_MCASP_GBLCTLX_REG... | [
0,
0
] |
Linux Kernel | sound/soc/ti/davinci-mcasp.c |
static void davinci_mcasp_start(struct davinci_mcasp *mcasp, int stream) {
mcasp->streams++;
if (stream == SNDRV_PCM_STREAM_PLAYBACK)
mcasp_start_tx(mcasp);
else
mcasp_start_rx(mcasp);
} | [
0,
0
] |
Linux Kernel | sound/soc/ti/davinci-mcasp.c | static void mcasp_stop_rx(struct davinci_mcasp *mcasp) {
mcasp_clr_bits(mcasp, DAVINCI_MCASP_EVTCTLR_REG,
mcasp->irq_request[SNDRV_PCM_STREAM_CAPTURE]);
/*
* In synchronous mode stop the TX clocks if no other stream is
* running
*/
if (mcasp_is_synchronous(mcasp) && !mcasp->streams) {
... | [
0,
0
] |
Linux Kernel | sound/soc/ti/davinci-mcasp.c | static irqreturn_t davinci_mcasp_tx_irq_handler(int irq, void *data) {
struct davinci_mcasp *mcasp = (struct davinci_mcasp *)data;
struct snd_pcm_substream *substream;
u32 irq_mask = mcasp->irq_request[SNDRV_PCM_STREAM_PLAYBACK];
u32 handled_mask = 0;
u32 stat;
stat = mcasp_get_reg(mcasp, DAVINCI_MCASP_TXS... | [
0,
0
] |
Linux Kernel | sound/soc/ti/davinci-mcasp.c |
static irqreturn_t davinci_mcasp_common_irq_handler(int irq, void *data) {
struct davinci_mcasp *mcasp = (struct davinci_mcasp *)data;
irqreturn_t ret = IRQ_NONE;
if (mcasp->substreams[SNDRV_PCM_STREAM_PLAYBACK])
ret = davinci_mcasp_tx_irq_handler(irq, data);
if (mcasp->substreams[SNDRV_PCM_STREAM_CAPTUR... | [
0,
0
] |
Linux Kernel | sound/soc/ti/davinci-mcasp.c | static int davinci_mcasp_set_sysclk(struct snd_soc_dai *dai, int clk_id,
unsigned int freq, int dir) {
struct davinci_mcasp *mcasp = snd_soc_dai_get_drvdata(dai);
pm_runtime_get_sync(mcasp->dev);
if (dir == SND_SOC_CLOCK_IN) {
switch (clk_id) {
case MCASP_CLK_HCLK_AHC... | [
0,
0
] |
Linux Kernel | sound/soc/ti/davinci-mcasp.c |
static int davinci_mcasp_set_tdm_slot(struct snd_soc_dai *dai,
unsigned int tx_mask,
unsigned int rx_mask, int slots,
int slot_width) {
struct davinci_mcasp *mcasp = snd_soc_dai_get_drvdata(dai);
if ... | [
1,
0
] |
Linux Kernel | sound/soc/ti/davinci-mcasp.c |
static int davinci_mcasp_trigger(struct snd_pcm_substream *substream, int cmd,
struct snd_soc_dai *cpu_dai) {
struct davinci_mcasp *mcasp = snd_soc_dai_get_drvdata(cpu_dai);
int ret = 0;
switch (cmd) {
case SNDRV_PCM_TRIGGER_RESUME:
case SNDRV_PCM_TRIGGER_START:
case SNDRV... | [
0,
0
] |
Linux Kernel | sound/soc/ti/davinci-mcasp.c |
static int davinci_mcasp_hw_rule_format(struct snd_pcm_hw_params *params,
struct snd_pcm_hw_rule *rule) {
struct davinci_mcasp_ruledata *rd = rule->private;
struct snd_mask *fmt = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT);
struct snd_mask nfmt;
int rate = params_r... | [
0,
0
] |
Linux Kernel | sound/soc/ti/davinci-mcasp.c |
static void davinci_mcasp_shutdown(struct snd_pcm_substream *substream,
struct snd_soc_dai *cpu_dai) {
struct davinci_mcasp *mcasp = snd_soc_dai_get_drvdata(cpu_dai);
mcasp->substreams[substream->stream] = NULL;
mcasp->active_serializers[substream->stream] = 0;
if (mcasp->o... | [
0,
0
] |
Linux Kernel | sound/soc/ti/davinci-mcasp.c |
static int davinci_mcasp_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/ti/davinci-mcasp.c |
static int davinci_mcasp_iec958_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *uctl) {
struct snd_soc_dai *cpu_dai = snd_kcontrol_chip(kcontrol);
struct davinci_mcasp *mcasp = snd_soc_dai_get_drvdata(cpu_dai);
memcpy(uctl->value.iec958.status, &mcasp->iec958_st... | [
1,
0
] |
Linux Kernel | sound/soc/ti/davinci-mcasp.c |
static int
davinci_mcasp_iec958_con_mask_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct snd_soc_dai *cpu_dai = snd_kcontrol_chip(kcontrol);
struct davinci_mcasp *mcasp = snd_soc_dai_get_drvdata(cpu_dai);
memset(ucontrol->value.iec958.status, 0x... | [
1,
0
] |
Linux Kernel | sound/soc/ti/davinci-mcasp.c |
static int davinci_mcasp_get_dma_type(struct davinci_mcasp *mcasp) {
struct dma_chan *chan;
const char *tmp;
int ret = PCM_EDMA;
if (!mcasp->dev->of_node)
return PCM_EDMA;
tmp = mcasp->dma_data[SNDRV_PCM_STREAM_PLAYBACK].filter_data;
chan = dma_request_chan(mcasp->dev, tmp);
if (IS_ERR(chan))
r... | [
1,
0
] |
Linux Kernel | sound/soc/ti/davinci-mcasp.c |
static u32 davinci_mcasp_txdma_offset(struct davinci_mcasp_pdata *pdata) {
int i;
u32 offset = 0;
if (pdata->version != MCASP_VERSION_4)
return pdata->tx_dma_offset;
for (i = 0; i < pdata->num_serializer; i++) {
if (pdata->serial_dir[i] == TX_MODE) {
if (!offset) {
offset = DAVINCI_MCAS... | [
0,
0
] |
Linux Kernel | sound/soc/ti/davinci-mcasp.c |
static void davinci_mcasp_gpio_set(struct gpio_chip *chip, unsigned offset,
int value) {
struct davinci_mcasp *mcasp = gpiochip_get_data(chip);
if (value)
mcasp_set_bits(mcasp, DAVINCI_MCASP_PDOUT_REG, BIT(offset));
else
mcasp_clr_bits(mcasp, DAVINCI_MCASP_PDOUT_REG, B... | [
0,
0
] |
Linux Kernel | sound/soc/ti/davinci-mcasp.c |
static int davinci_mcasp_runtime_resume(struct device *dev) {
struct davinci_mcasp *mcasp = dev_get_drvdata(dev);
struct davinci_mcasp_context *context = &mcasp->context;
u32 reg;
int i;
for (i = 0; i < ARRAY_SIZE(context_regs); i++)
mcasp_set_reg(mcasp, context_regs[i], context->config_regs[i]);
if ... | [
0,
0
] |
Linux Kernel | sound/soc/ti/j721e-evm.c | static int j721e_audio_startup(struct snd_pcm_substream *substream) {
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
struct j721e_priv *priv = snd_soc_card_get_drvdata(rtd->card);
unsigned int domain_id = rtd->dai_link->id;
struct j721e_audio_domain *domain = &priv->audio_domains[domain_id]... | [
1,
0
] |
Linux Kernel | sound/soc/ti/j721e-evm.c |
static int j721e_audio_init_ivi(struct snd_soc_pcm_runtime *rtd) {
struct snd_soc_dapm_context *dapm = &rtd->card->dapm;
snd_soc_dapm_new_controls(dapm, j721e_ivi_codec_a_dapm_widgets,
ARRAY_SIZE(j721e_ivi_codec_a_dapm_widgets));
snd_soc_dapm_add_routes(dapm, j721e_codec_a_dapm_route... | [
0,
0
] |
Linux Kernel | sound/soc/ti/j721e-evm.c |
static int j721e_get_clocks(struct device *dev,
struct j721e_audio_clocks *clocks, char *prefix) {
struct clk *parent;
char *clk_name;
int ret;
clocks->target = devm_clk_get(dev, prefix);
if (IS_ERR(clocks->target))
return dev_err_probe(dev, PTR_ERR(clocks->target), "failed t... | [
0,
0
] |
Linux Kernel | sound/soc/ti/n810.c |
static void n810_shutdown(struct snd_pcm_substream *substream) {
clk_disable_unprepare(sys_clkout2);
} | [
0,
0
] |
Linux Kernel | sound/soc/ti/n810.c |
static int n810_get_spk(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
ucontrol->value.enumerated.item[0] = n810_spk_func;
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/ti/n810.c |
static int n810_set_jack(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct snd_soc_card *card = snd_kcontrol_chip(kcontrol);
if (n810_jack_func == ucontrol->value.enumerated.item[0])
return 0;
n810_jack_func = ucontrol->value.enumerated.item[0];
n810_ex... | [
0,
0
] |
Linux Kernel | sound/soc/ti/n810.c |
static int n810_jack_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *k, int event) {
if (SND_SOC_DAPM_EVENT_ON(event))
gpio_set_value(N810_HEADSET_AMP_GPIO, 1);
else
gpio_set_value(N810_HEADSET_AMP_GPIO, 0);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/ti/n810.c |
static void __exit n810_soc_exit(void) {
gpio_free(N810_SPEAKER_AMP_GPIO);
gpio_free(N810_HEADSET_AMP_GPIO);
clk_put(sys_clkout2_src);
clk_put(sys_clkout2);
clk_put(func96m_clk);
platform_device_unregister(n810_snd_device);
} | [
0,
0
] |
Linux Kernel | sound/soc/ti/omap-abe-twl6040.c |
static int omap_abe_dmic_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 *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
int ret = 0;
ret = snd_soc_dai_set_sysclk(cp... | [
0,
0
] |
Linux Kernel | sound/soc/ti/omap-abe-twl6040.c | static int omap_abe_twl6040_init(struct snd_soc_pcm_runtime *rtd) {
struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component;
struct snd_soc_card *card = rtd->card;
struct abe_twl6040 *priv = snd_soc_card_get_drvdata(card);
int hs_trim;
int ret;
hs_trim = twl6040_get_trim_value(component,... | [
0,
0
] |
Linux Kernel | sound/soc/ti/omap-dmic.c |
static inline int omap_dmic_read(struct omap_dmic *dmic, u16 reg) {
return readl_relaxed(dmic->io_base + reg);
} | [
0,
0
] |
Linux Kernel | sound/soc/ti/omap-dmic.c |
static inline int dmic_is_enabled(struct omap_dmic *dmic) {
return omap_dmic_read(dmic, OMAP_DMIC_CTRL_REG) & OMAP_DMIC_UP_ENABLE_MASK;
} | [
0,
0
] |
Linux Kernel | sound/soc/ti/omap-dmic.c |
static void omap_dmic_dai_shutdown(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai) {
struct omap_dmic *dmic = snd_soc_dai_get_drvdata(dai);
mutex_lock(&dmic->mutex);
cpu_latency_qos_remove_request(&dmic->pm_qos_req);
if (!snd_soc_dai_active(dai))
dmic->ac... | [
0,
0
] |
Linux Kernel | sound/soc/ti/omap-dmic.c | static int omap_dmic_select_divider(struct omap_dmic *dmic, int sample_rate) {
int divider = -EINVAL;
if (sample_rate == 192000) {
if (dmic->fclk_freq == 19200000 && dmic->out_freq == 3840000)
divider = 0x6; /* Divider: 5 (192KHz sampling rate) */
else
dev_err(dmic->dev, "invalid clock configur... | [
1,
0
] |
Linux Kernel | sound/soc/ti/omap-dmic.c | static int omap_dmic_probe(struct snd_soc_dai *dai) {
struct omap_dmic *dmic = snd_soc_dai_get_drvdata(dai);
pm_runtime_enable(dmic->dev);
pm_runtime_get_sync(dmic->dev);
omap_dmic_write(dmic, OMAP_DMIC_CTRL_REG, 0x00);
pm_runtime_put_sync(dmic->dev);
/* Configure DMIC threshold value */
dmic->threshol... | [
0,
0
] |
Linux Kernel | sound/soc/ti/omap-dmic.c |
static int omap_dmic_remove(struct snd_soc_dai *dai) {
struct omap_dmic *dmic = snd_soc_dai_get_drvdata(dai);
pm_runtime_disable(dmic->dev);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/ti/omap-dmic.c |
static int asoc_dmic_probe(struct platform_device *pdev) {
struct omap_dmic *dmic;
struct resource *res;
int ret;
dmic = devm_kzalloc(&pdev->dev, sizeof(struct omap_dmic), GFP_KERNEL);
if (!dmic)
return -ENOMEM;
platform_set_drvdata(pdev, dmic);
dmic->dev = &pdev->dev;
dmic->sysclk = OMAP_DMIC_SY... | [
1,
0
] |
Linux Kernel | sound/soc/ti/omap-hdmi.c |
static void hdmi_dai_shutdown(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai) {
struct hdmi_audio_data *ad = card_drvdata_substream(substream);
WARN_ON(ad->current_stream != substream);
ad->ops->audio_shutdown(ad->dssdev);
mutex_lock(&ad->current_stream_lock);
a... | [
0,
0
] |
Linux Kernel | sound/soc/ti/omap-mcbsp-st.c |
static void omap_mcbsp_st_fir_write(struct omap_mcbsp *mcbsp, s16 *fir) {
u16 val, i;
val = MCBSP_ST_READ(mcbsp, SSELCR);
if (val & ST_COEFFWREN)
MCBSP_ST_WRITE(mcbsp, SSELCR, val & ~(ST_COEFFWREN));
MCBSP_ST_WRITE(mcbsp, SSELCR, val | ST_COEFFWREN);
for (i = 0; i < 128; i++)
MCBSP_ST_WRITE(mcbsp... | [
0,
0
] |
Linux Kernel | sound/soc/ti/omap-mcbsp-st.c |
static int omap_mcbsp_st_enable(struct omap_mcbsp *mcbsp) {
struct omap_mcbsp_st_data *st_data = mcbsp->st_data;
if (!st_data)
return -ENODEV;
spin_lock_irq(&mcbsp->lock);
st_data->enabled = 1;
omap_mcbsp_st_start(mcbsp);
spin_unlock_irq(&mcbsp->lock);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/ti/omap-mcbsp-st.c |
static int omap_mcbsp_st_disable(struct omap_mcbsp *mcbsp) {
struct omap_mcbsp_st_data *st_data = mcbsp->st_data;
int ret = 0;
if (!st_data)
return -ENODEV;
spin_lock_irq(&mcbsp->lock);
omap_mcbsp_st_stop(mcbsp);
st_data->enabled = 0;
spin_unlock_irq(&mcbsp->lock);
return ret;
} | [
0,
0
] |
Linux Kernel | sound/soc/ti/omap-mcbsp-st.c |
static ssize_t st_taps_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t size) {
struct omap_mcbsp *mcbsp = dev_get_drvdata(dev);
struct omap_mcbsp_st_data *st_data = mcbsp->st_data;
int val, tmp, status, i = 0;
spin_lock_irq(&mcbsp->lock);
memset(... | [
1,
0
] |
Linux Kernel | sound/soc/ti/omap-mcbsp-st.c |
int omap_mcbsp_st_init(struct platform_device *pdev) {
struct omap_mcbsp *mcbsp = platform_get_drvdata(pdev);
struct omap_mcbsp_st_data *st_data;
struct resource *res;
int ret;
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "sidetone");
if (!res)
return 0;
st_data = devm_kzalloc(mcbsp->de... | [
1,
0
] |
Linux Kernel | sound/soc/ti/omap-mcbsp-st.c |
static int omap_mcbsp_st_put_mode(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct snd_soc_dai *cpu_dai = snd_kcontrol_chip(kcontrol);
struct omap_mcbsp *mcbsp = snd_soc_dai_get_drvdata(cpu_dai);
u8 value = ucontrol->value.integer.value[0];
if (val... | [
0,
0
] |
Linux Kernel | sound/soc/ti/omap-mcbsp-st.c |
static int omap_mcbsp_st_get_mode(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct snd_soc_dai *cpu_dai = snd_kcontrol_chip(kcontrol);
struct omap_mcbsp *mcbsp = snd_soc_dai_get_drvdata(cpu_dai);
ucontrol->value.integer.value[0] = omap_mcbsp_st_is_en... | [
0,
0
] |
Linux Kernel | sound/soc/ti/omap-mcbsp.c | static int omap_mcbsp_dma_reg_params(struct omap_mcbsp *mcbsp,
unsigned int stream) {
int data_reg;
if (stream == SNDRV_PCM_STREAM_PLAYBACK) {
if (mcbsp->pdata->reg_size == 2)
data_reg = OMAP_MCBSP_REG_DXR1;
else
data_reg = OMAP_MCBSP_REG_DXR;
} else {
... | [
1,
0
] |
Linux Kernel | sound/soc/ti/omap-mcbsp.c | static u16 omap_mcbsp_get_tx_delay(struct omap_mcbsp *mcbsp) {
u16 buffstat;
buffstat = MCBSP_READ(mcbsp, XBUFFSTAT);
/* Number of slots are different in McBSP ports */
return mcbsp->pdata->buffer_size - buffstat;
} | [
1,
0
] |
Linux Kernel | sound/soc/ti/omap-mcbsp.c |
static int omap_mcbsp_hwrule_min_buffersize(struct snd_pcm_hw_params *params,
struct snd_pcm_hw_rule *rule) {
struct snd_interval *buffer_size =
hw_param_interval(params, SNDRV_PCM_HW_PARAM_BUFFER_SIZE);
struct snd_interval *channels =
hw_param_interval(param... | [
0,
0
] |
Linux Kernel | sound/soc/ti/omap-mcbsp.c | static int omap_mcbsp_dai_prepare(struct snd_pcm_substream *substream,
struct snd_soc_dai *cpu_dai) {
struct omap_mcbsp *mcbsp = snd_soc_dai_get_drvdata(cpu_dai);
struct pm_qos_request *pm_qos_req = &mcbsp->pm_qos_req;
int tx = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK);
... | [
1,
0
] |
Linux Kernel | sound/soc/ti/omap-mcbsp.c |
static int omap_mcbsp_dai_set_clkdiv(struct snd_soc_dai *cpu_dai, int div_id,
int div) {
struct omap_mcbsp *mcbsp = snd_soc_dai_get_drvdata(cpu_dai);
struct omap_mcbsp_reg_cfg *regs = &mcbsp->cfg_regs;
if (div_id != OMAP_MCBSP_CLKGDV)
return -ENODEV;
mcbsp->clk_div = ... | [
0,
0
] |
Linux Kernel | sound/soc/ti/omap-mcbsp.c | static int omap_mcbsp_dai_set_dai_sysclk(struct snd_soc_dai *cpu_dai,
int clk_id, unsigned int freq,
int dir) {
struct omap_mcbsp *mcbsp = snd_soc_dai_get_drvdata(cpu_dai);
struct omap_mcbsp_reg_cfg *regs = &mcbsp->cfg_regs;
int err... | [
0,
0
] |
Linux Kernel | sound/soc/ti/omap-mcpdm.c | static inline int omap_mcpdm_active(struct omap_mcpdm *mcpdm) {
return omap_mcpdm_read(mcpdm, MCPDM_REG_CTRL) &
(MCPDM_PDM_DN_MASK | MCPDM_PDM_UP_MASK);
} | [
0,
0
] |
Linux Kernel | sound/soc/ti/omap-mcpdm.c | static irqreturn_t omap_mcpdm_irq_handler(int irq, void *dev_id) {
struct omap_mcpdm *mcpdm = dev_id;
int irq_status;
irq_status = omap_mcpdm_read(mcpdm, MCPDM_REG_IRQSTATUS);
omap_mcpdm_write(mcpdm, MCPDM_REG_IRQSTATUS, irq_status);
if (irq_status & MCPDM_DN_IRQ_FULL)
dev_dbg(mcpdm->dev, "DN (playback... | [
0,
0
] |
Linux Kernel | sound/soc/ti/omap-mcpdm.c |
static int omap_mcpdm_dai_startup(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai) {
struct omap_mcpdm *mcpdm = snd_soc_dai_get_drvdata(dai);
mutex_lock(&mcpdm->mutex);
if (!snd_soc_dai_active(dai))
omap_mcpdm_open_streams(mcpdm);
mutex_unlock(&mcpdm->mutex... | [
0,
0
] |
Linux Kernel | sound/soc/ti/omap-mcpdm.c | static int omap_mcpdm_prepare(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai) {
struct omap_mcpdm *mcpdm = snd_soc_dai_get_drvdata(dai);
struct pm_qos_request *pm_qos_req = &mcpdm->pm_qos_req;
int tx = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK);
int stream1 = tx... | [
1,
0
] |
Linux Kernel | sound/soc/ti/omap3pandora.c | static int omap3pandora_in_init(struct snd_soc_pcm_runtime *rtd) {
struct snd_soc_dapm_context *dapm = &rtd->card->dapm;
snd_soc_dapm_nc_pin(dapm, "HSMIC");
snd_soc_dapm_nc_pin(dapm, "CARKITMIC");
snd_soc_dapm_nc_pin(dapm, "DIGIMIC0");
snd_soc_dapm_nc_pin(dapm, "DIGIMIC1");
return 0;
} | [
0,
0
] |
Linux Kernel | sound/soc/ti/rx51.c |
static int rx51_set_spk(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct snd_soc_card *card = snd_kcontrol_chip(kcontrol);
if (rx51_spk_func == ucontrol->value.enumerated.item[0])
return 0;
rx51_spk_func = ucontrol->value.enumerated.item[0];
rx51_ext_co... | [
0,
0
] |
Linux Kernel | sound/soc/ti/sdma-pcm.h | static inline int sdma_pcm_platform_register(struct device *dev,
char *txdmachan, char *rxdmachan) {
return -ENODEV;
} | [
0,
0
] |
Linux Kernel | sound/soc/uniphier/aio-compress.c | static int uniphier_aio_compr_set_params(struct snd_soc_component *component,
struct snd_compr_stream *cstream,
struct snd_compr_params *params) {
struct snd_soc_pcm_runtime *rtd = cstream->private_data;
struct uniphier_aio *aio = uni... | [
0,
0
] |
Linux Kernel | sound/soc/uniphier/aio-compress.c |
static int uniphier_aio_compr_trigger(struct snd_soc_component *component,
struct snd_compr_stream *cstream,
int cmd) {
struct snd_soc_pcm_runtime *rtd = cstream->private_data;
struct snd_compr_runtime *runtime = cstream->runtime;
struct... | [
0,
0
] |
Linux Kernel | sound/soc/uniphier/aio-compress.c |
static int uniphier_aio_compr_get_caps(struct snd_soc_component *component,
struct snd_compr_stream *cstream,
struct snd_compr_caps *caps) {
caps->num_codecs = 1;
caps->min_fragment_size = AUD_MIN_FRAGMENT_SIZE;
caps->max_fragment_size... | [
0,
0
] |
Linux Kernel | sound/soc/uniphier/aio-core.c |
u64 aio_rb_cnt(struct uniphier_aio_sub *sub) {
return rb_cnt(sub->wr_offs, sub->rd_offs, sub->compr_bytes);
} | [
0,
0
] |
Linux Kernel | sound/soc/uniphier/aio-core.c |
u64 aio_rbt_cnt_to_end(struct uniphier_aio_sub *sub) {
return rb_cnt_to_end(sub->wr_offs, sub->rd_offs, sub->compr_bytes);
} | [
0,
0
] |
Linux Kernel | sound/soc/uniphier/aio-core.c |
u64 aio_rb_space_to_end(struct uniphier_aio_sub *sub) {
return rb_space_to_end(sub->wr_offs, sub->rd_offs, sub->compr_bytes);
} | [
0,
0
] |
Linux Kernel | sound/soc/uniphier/aio-core.c | int aio_chip_set_pll(struct uniphier_aio_chip *chip, int pll_id,
unsigned int freq) {
struct device *dev = &chip->pdev->dev;
struct regmap *r = chip->regmap;
int shift;
u32 v;
if (freq == 0)
return 0;
switch (pll_id) {
case AUD_PLL_A1:
shift = 0;
break;
case AUD_PLL_F1... | [
0,
0
] |
Linux Kernel | sound/soc/uniphier/aio-core.c | static int aio_port_set_ch(struct uniphier_aio_sub *sub) {
struct regmap *r = sub->aio->chip->regmap;
static const u32 slotsel_2ch[] = {
0, 0, 0, 0, 0,
};
static const u32 slotsel_multi[] = {
OPORTMXTYSLOTCTR_SLOTSEL_SLOT0, OPORTMXTYSLOTCTR_SLOTSEL_SLOT1,
OPORTMXTYSLOTCTR_SLOTSEL_SLOT2, OPORTM... | [
1,
0
] |
Linux Kernel | sound/soc/uniphier/aio-core.c | void aio_port_set_volume(struct uniphier_aio_sub *sub, int vol) {
struct regmap *r = sub->aio->chip->regmap;
int oport_map = sub->swm->oport.map;
int cur, diff, slope = 0, fs;
if (sub->swm->dir == PORT_DIR_INPUT)
return;
cur = aio_port_get_volume(sub);
diff = abs(vol - cur);
fs = params_rate(&sub->p... | [
1,
0
] |
Linux Kernel | sound/soc/uniphier/aio-core.c | int aio_src_set_param(struct uniphier_aio_sub *sub,
const struct snd_pcm_hw_params *params) {
struct regmap *r = sub->aio->chip->regmap;
u32 v;
if (sub->swm->dir != PORT_DIR_OUTPUT)
return 0;
regmap_write(r, OPORTMXSRC1CTR(sub->swm->oport.map),
OPORTMXSRC1CTR_THMODE_SR... | [
1,
0
] |
Linux Kernel | sound/soc/uniphier/aio-core.c |
int aio_srcif_set_param(struct uniphier_aio_sub *sub) {
struct regmap *r = sub->aio->chip->regmap;
regmap_write(r, PBINMXCTR(sub->swm->iif.map),
PBINMXCTR_NCONNECT_CONNECT | PBINMXCTR_INOUTSEL_OUT |
(sub->swm->oport.map << PBINMXCTR_PBINSEL_SHIFT) |
PBINMXCTR_E... | [
1,
0
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.