• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ snd_soc_platform_get_drvdata函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中snd_soc_platform_get_drvdata函数的典型用法代码示例。如果您正苦于以下问题:C++ snd_soc_platform_get_drvdata函数的具体用法?C++ snd_soc_platform_get_drvdata怎么用?C++ snd_soc_platform_get_drvdata使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了snd_soc_platform_get_drvdata函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: sst_byt_pcm_open

static int sst_byt_pcm_open(struct snd_pcm_substream *substream)
{
    struct snd_soc_pcm_runtime *rtd = substream->private_data;
    struct sst_byt_priv_data *pdata =
        snd_soc_platform_get_drvdata(rtd->platform);
    struct sst_byt_pcm_data *pcm_data = &pdata->pcm[substream->stream];
    struct sst_byt *byt = pdata->byt;

    dev_dbg(rtd->dev, "PCM: open\n");

    mutex_lock(&pcm_data->mutex);

    pcm_data->substream = substream;

    snd_soc_set_runtime_hwparams(substream, &sst_byt_pcm_hardware);

    pcm_data->stream = sst_byt_stream_new(byt, substream->stream + 1,
                                          byt_notify_pointer, pcm_data);
    if (pcm_data->stream == NULL) {
        dev_err(rtd->dev, "failed to create stream\n");
        mutex_unlock(&pcm_data->mutex);
        return -EINVAL;
    }

    mutex_unlock(&pcm_data->mutex);
    return 0;
}
开发者ID:Nukil,项目名称:linux-2.6,代码行数:27,代码来源:sst-baytrail-pcm.c


示例2: hi3630_srcup_normal_new

static int hi3630_srcup_normal_new(struct snd_soc_pcm_runtime *rtd)
{
	struct snd_card *card = rtd->card->snd_card;
	struct snd_pcm  *pcm  = rtd->pcm;
	struct hi3630_srcup_data *pdata =
		(struct hi3630_srcup_data *)snd_soc_platform_get_drvdata(rtd->platform);
	int ret = 0;

	BUG_ON(NULL == card);
	BUG_ON(NULL == pcm);
	BUG_ON(NULL == pdata);

	if (!card->dev->dma_mask)
		card->dev->dma_mask = &hi3630_pcm_dmamask;
	if (!card->dev->coherent_dma_mask)
		card->dev->coherent_dma_mask = DMA_BIT_MASK(32);

	if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) {
		ret = hi3630_pcm_preallocate_dma_buffer(pcm,
			SNDRV_PCM_STREAM_PLAYBACK);
		if (ret) {
			loge("preallocate dma buffer error, error No. = %d\n", ret);
			return ret;
		}
	}

	return ret;
}
开发者ID:HuaweiHonor4C,项目名称:kernel_hi6210sft_mm,代码行数:28,代码来源:hi3630_srcup_normal.c


示例3: lpass_platform_pcmops_pointer

static snd_pcm_uframes_t lpass_platform_pcmops_pointer(
		struct snd_pcm_substream *substream)
{
	struct snd_soc_pcm_runtime *soc_runtime = substream->private_data;
	struct lpass_data *drvdata =
			snd_soc_platform_get_drvdata(soc_runtime->platform);
	unsigned int base_addr, curr_addr;
	int ret;

	ret = regmap_read(drvdata->lpaif_map,
			LPAIF_RDMABASE_REG(LPAIF_RDMA_CHAN_MI2S), &base_addr);
	if (ret) {
		dev_err(soc_runtime->dev, "%s() error reading from rdmabase reg: %d\n",
				__func__, ret);
		return ret;
	}

	ret = regmap_read(drvdata->lpaif_map,
			LPAIF_RDMACURR_REG(LPAIF_RDMA_CHAN_MI2S), &curr_addr);
	if (ret) {
		dev_err(soc_runtime->dev, "%s() error reading from rdmacurr reg: %d\n",
				__func__, ret);
		return ret;
	}

	return bytes_to_frames(substream->runtime, curr_addr - base_addr);
}
开发者ID:19Dan01,项目名称:linux,代码行数:27,代码来源:lpass-platform.c


示例4: hsw_pcm_open

static int hsw_pcm_open(struct snd_pcm_substream *substream)
{
	struct snd_soc_pcm_runtime *rtd = substream->private_data;
	struct hsw_priv_data *pdata =
		snd_soc_platform_get_drvdata(rtd->platform);
	struct hsw_pcm_data *pcm_data;
	struct sst_hsw *hsw = pdata->hsw;

	pcm_data = &pdata->pcm[rtd->cpu_dai->id];

	mutex_lock(&pcm_data->mutex);

	snd_soc_pcm_set_drvdata(rtd, pcm_data);
	pcm_data->substream = substream;

	snd_soc_set_runtime_hwparams(substream, &hsw_pcm_hardware);

	pcm_data->stream = sst_hsw_stream_new(hsw, rtd->cpu_dai->id,
		hsw_notify_pointer, pcm_data);
	if (pcm_data->stream == NULL) {
		dev_err(rtd->dev, "error: failed to create stream\n");
		mutex_unlock(&pcm_data->mutex);
		return -EINVAL;
	}

	/* Set previous saved volume */
	sst_hsw_stream_set_volume(hsw, pcm_data->stream, 0,
			0, pcm_data->volume[0]);
	sst_hsw_stream_set_volume(hsw, pcm_data->stream, 0,
			1, pcm_data->volume[1]);

	mutex_unlock(&pcm_data->mutex);
	return 0;
}
开发者ID:908626950,项目名称:linux,代码行数:34,代码来源:sst-haswell-pcm.c


示例5: hsw_pcm_close

static int hsw_pcm_close(struct snd_pcm_substream *substream)
{
	struct snd_soc_pcm_runtime *rtd = substream->private_data;
	struct hsw_priv_data *pdata =
		snd_soc_platform_get_drvdata(rtd->platform);
	struct hsw_pcm_data *pcm_data = snd_soc_pcm_get_drvdata(rtd);
	struct sst_hsw *hsw = pdata->hsw;
	int ret;

	mutex_lock(&pcm_data->mutex);
	ret = sst_hsw_stream_reset(hsw, pcm_data->stream);
	if (ret < 0) {
		dev_dbg(rtd->dev, "error: reset stream failed %d\n", ret);
		goto out;
	}

	ret = sst_hsw_stream_free(hsw, pcm_data->stream);
	if (ret < 0) {
		dev_dbg(rtd->dev, "error: free stream failed %d\n", ret);
		goto out;
	}
	pcm_data->stream = NULL;

out:
	mutex_unlock(&pcm_data->mutex);
	return ret;
}
开发者ID:908626950,项目名称:linux,代码行数:27,代码来源:sst-haswell-pcm.c


示例6: hsw_stream_volume_get

static int hsw_stream_volume_get(struct snd_kcontrol *kcontrol,
				struct snd_ctl_elem_value *ucontrol)
{
	struct snd_soc_platform *platform = snd_kcontrol_chip(kcontrol);
	struct soc_mixer_control *mc =
		(struct soc_mixer_control *)kcontrol->private_value;
	struct hsw_priv_data *pdata =
		snd_soc_platform_get_drvdata(platform);
	struct hsw_pcm_data *pcm_data = &pdata->pcm[mc->reg];
	struct sst_hsw *hsw = pdata->hsw;
	u32 volume;

	mutex_lock(&pcm_data->mutex);

	if (!pcm_data->stream) {
		ucontrol->value.integer.value[0] =
			hsw_ipc_to_mixer(pcm_data->volume[0]);
		ucontrol->value.integer.value[1] =
			hsw_ipc_to_mixer(pcm_data->volume[1]);
		mutex_unlock(&pcm_data->mutex);
		return 0;
	}

	sst_hsw_stream_get_volume(hsw, pcm_data->stream, 0, 0, &volume);
	ucontrol->value.integer.value[0] = hsw_ipc_to_mixer(volume);
	sst_hsw_stream_get_volume(hsw, pcm_data->stream, 0, 1, &volume);
	ucontrol->value.integer.value[1] = hsw_ipc_to_mixer(volume);
	mutex_unlock(&pcm_data->mutex);

	return 0;
}
开发者ID:908626950,项目名称:linux,代码行数:31,代码来源:sst-haswell-pcm.c


示例7: hsw_pcm_trigger

static int hsw_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
{
	struct snd_soc_pcm_runtime *rtd = substream->private_data;
	struct hsw_priv_data *pdata =
		snd_soc_platform_get_drvdata(rtd->platform);
	struct hsw_pcm_data *pcm_data = snd_soc_pcm_get_drvdata(rtd);
	struct sst_hsw *hsw = pdata->hsw;

	switch (cmd) {
	case SNDRV_PCM_TRIGGER_START:
	case SNDRV_PCM_TRIGGER_RESUME:
	case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
		sst_hsw_stream_resume(hsw, pcm_data->stream, 0);
		break;
	case SNDRV_PCM_TRIGGER_STOP:
	case SNDRV_PCM_TRIGGER_SUSPEND:
	case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
		sst_hsw_stream_pause(hsw, pcm_data->stream, 0);
		break;
	default:
		break;
	}

	return 0;
}
开发者ID:908626950,项目名称:linux,代码行数:25,代码来源:sst-haswell-pcm.c


示例8: sst_soc_probe

static int sst_soc_probe(struct snd_soc_platform *platform)
{
	struct sst_data *ctx = snd_soc_platform_get_drvdata(platform);
	struct soft_platform_id spid;
	int ret = 0;

	memcpy(&spid, ctx->pdata->spid, sizeof(spid));
	pr_debug("Enter:%s\n", __func__);
	if (INTEL_MID_BOARD(1, PHONE, CLVTP) ||
	    INTEL_MID_BOARD(1, TABLET, CLVT) ||
	    INTEL_MID_BOARD(1, TABLET, BYT))
		return sst_platform_clv_init(platform);
	if (INTEL_MID_BOARD(1, PHONE, MRFL) ||
			INTEL_MID_BOARD(1, TABLET, MRFL) ||
			INTEL_MID_BOARD(1, PHONE, MOFD) ||
			INTEL_MID_BOARD(1, TABLET, MOFD)) {
#if IS_BUILTIN(CONFIG_SST_MRFLD_DPCM)
		ret = sst_dsp_init_v2_dpcm(platform);
#else
		ret = sst_dsp_init(platform);
#endif
		if (ret)
			return ret;
		ret = snd_soc_register_effect(platform->card, &effects_ops);
	}
	if (INTEL_MID_BOARD(1, TABLET, CHT)) {
		ret = sst_dsp_init(platform);
		if (ret)
			pr_err("Dsp init failed: %d\n", ret);
	}
	return ret;
}
开发者ID:NotKit,项目名称:android-ia_kernel_intel_baytrail,代码行数:32,代码来源:pcm.c


示例9: sst_byt_pcm_trigger

static int sst_byt_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
{
	struct snd_soc_pcm_runtime *rtd = substream->private_data;
	struct sst_byt_priv_data *pdata =
		snd_soc_platform_get_drvdata(rtd->platform);
	struct sst_byt_pcm_data *pcm_data = snd_soc_pcm_get_drvdata(rtd);
	struct sst_byt *byt = pdata->byt;

	dev_dbg(rtd->dev, "PCM: trigger %d\n", cmd);

	switch (cmd) {
	case SNDRV_PCM_TRIGGER_START:
		sst_byt_stream_start(byt, pcm_data->stream);
		break;
	case SNDRV_PCM_TRIGGER_RESUME:
	case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
		sst_byt_stream_resume(byt, pcm_data->stream);
		break;
	case SNDRV_PCM_TRIGGER_STOP:
		sst_byt_stream_stop(byt, pcm_data->stream);
		break;
	case SNDRV_PCM_TRIGGER_SUSPEND:
	case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
		sst_byt_stream_pause(byt, pcm_data->stream);
		break;
	default:
		break;
	}

	return 0;
}
开发者ID:908626950,项目名称:linux,代码行数:31,代码来源:sst-baytrail-pcm.c


示例10: lpe_mixer_headset_set

static int lpe_mixer_headset_set(struct snd_kcontrol *kcontrol,
                                 struct snd_ctl_elem_value *ucontrol)
{
    int mixer_input_stream;
    struct snd_soc_platform *platform = snd_kcontrol_chip(kcontrol);
    struct sst_data *sst = snd_soc_platform_get_drvdata(platform);

    switch (ucontrol->value.integer.value[0]) {
    case 0:
        pr_debug("input is None\n");
        mixer_input_stream = SST_STREAM_DEVICE_HS
                             | SST_INPUT_STREAM_NONE;
        break;
    case 1:
        pr_debug("input is PCM stream\n");
        mixer_input_stream = SST_STREAM_DEVICE_HS
                             | SST_INPUT_STREAM_PCM;
        break;
    case 2:
        pr_debug("input is Compress  stream\n");
        mixer_input_stream = SST_STREAM_DEVICE_HS
                             | SST_INPUT_STREAM_COMPRESS;
        break;
    case 3:
        pr_debug("input is Mixed stream\n");
        mixer_input_stream = SST_STREAM_DEVICE_HS
                             | SST_INPUT_STREAM_MIXED;
        break;
    default:
        pr_err("Invalid Input:%ld\n", ucontrol->value.integer.value[0]);
        return -EINVAL;
    }
    sst->lpe_mixer_input_hs  = ucontrol->value.integer.value[0];
    return sst_set_mixer_param(mixer_input_stream);
}
开发者ID:primiano,项目名称:edison-kernel,代码行数:35,代码来源:controls_v1.c


示例11: ath79_pcm_close

static int ath79_pcm_close(struct snd_pcm_substream *ss)
{
	struct snd_soc_pcm_runtime *runtime = ss->private_data;
	struct snd_soc_platform *platform = runtime->platform;
	struct ath79_pcm_pltfm_priv *prdata = snd_soc_platform_get_drvdata(platform);
	struct ath79_pcm_rt_priv *rtpriv;

	if (!prdata)
		return 0;

	if (ss->stream == SNDRV_PCM_STREAM_PLAYBACK) {
		prdata->playback = NULL;
	} else {
		prdata->capture = NULL;
	}

	if (!prdata->playback && !prdata->capture) {
		free_irq(ATH79_MISC_IRQ(7), prdata);
		kfree(prdata);
		snd_soc_platform_set_drvdata(platform, NULL);
	}
	rtpriv = ss->runtime->private_data;
	kfree(rtpriv);

	return 0;
}
开发者ID:ConorOG,项目名称:openwrt-misc,代码行数:26,代码来源:ath79-pcm.c


示例12: put_mixer

/* TODO: we have to use the shift value atm to represent register
 * id due to current HAL ID MACROS not being unique.
 */
static int put_mixer(struct snd_kcontrol *kcontrol,
	struct snd_ctl_elem_value *ucontrol)
{
	struct snd_soc_dapm_widget_list *wlist = snd_kcontrol_chip(kcontrol);
	struct snd_soc_dapm_widget *widget = wlist->widgets[0];
	struct snd_soc_platform *platform = widget->platform;
	struct omap_abe *abe = snd_soc_platform_get_drvdata(platform);
	struct soc_mixer_control *mc =
		(struct soc_mixer_control *)kcontrol->private_value;

	abe_dsp_pm_get(abe);

	if (ucontrol->value.integer.value[0]) {
		abe->opp.widget[mc->reg] |= ucontrol->value.integer.value[0]<<mc->shift;
		snd_soc_dapm_mixer_update_power(widget, kcontrol, 1);
		omap_aess_enable_gain(abe->aess, mc->reg);
	} else {
		abe->opp.widget[mc->reg] &= ~(0x1<<mc->shift);
		snd_soc_dapm_mixer_update_power(widget, kcontrol, 0);
		omap_aess_disable_gain(abe->aess, mc->reg);
	}

	pm_runtime_put_sync(abe->dev);
	return 1;
}
开发者ID:koh523,项目名称:kernel-pandaboard-ES-RevB3,代码行数:28,代码来源:omap-abe-mixer.c


示例13: snd_soc_platform_get_drvdata

static snd_pcm_uframes_t mtk_afe_pcm_pointer
			 (struct snd_pcm_substream *substream)
{
	struct snd_soc_pcm_runtime *rtd = substream->private_data;
	struct mtk_base_afe *afe = snd_soc_platform_get_drvdata(rtd->platform);
	struct mtk_base_afe_memif *memif = &afe->memif[rtd->cpu_dai->id];
	const struct mtk_base_memif_data *memif_data = memif->data;
	struct regmap *regmap = afe->regmap;
	struct device *dev = afe->dev;
	int reg_ofs_base = memif_data->reg_ofs_base;
	int reg_ofs_cur = memif_data->reg_ofs_cur;
	unsigned int hw_ptr = 0, hw_base = 0;
	int ret, pcm_ptr_bytes;

	ret = regmap_read(regmap, reg_ofs_cur, &hw_ptr);
	if (ret || hw_ptr == 0) {
		dev_err(dev, "%s hw_ptr err\n", __func__);
		pcm_ptr_bytes = 0;
		goto POINTER_RETURN_FRAMES;
	}

	ret = regmap_read(regmap, reg_ofs_base, &hw_base);
	if (ret || hw_base == 0) {
		dev_err(dev, "%s hw_ptr err\n", __func__);
		pcm_ptr_bytes = 0;
		goto POINTER_RETURN_FRAMES;
	}

	pcm_ptr_bytes = hw_ptr - hw_base;

POINTER_RETURN_FRAMES:
	return bytes_to_frames(substream->runtime, pcm_ptr_bytes);
}
开发者ID:AK101111,项目名称:linux,代码行数:33,代码来源:mtk-afe-platform-driver.c


示例14: ul_mux_get_route

static int ul_mux_get_route(struct snd_kcontrol *kcontrol,
	struct snd_ctl_elem_value *ucontrol)
{
	struct snd_soc_dapm_widget_list *wlist = snd_kcontrol_chip(kcontrol);
	struct snd_soc_dapm_widget *widget = wlist->widgets[0];
	struct snd_soc_platform *platform = widget->platform;
	struct omap_abe *abe = snd_soc_platform_get_drvdata(platform);
	struct soc_enum *e =
		(struct soc_enum *)kcontrol->private_value;
	int reg = e->reg - OMAP_ABE_MUX(0), i, rval = 0;

	/* TODO: remove the gap */
	if (reg < 8) {
		/* 0  .. 9   = MM_UL */
		rval = abe->mixer.route_ul[reg];
	} else if (reg < 12) {
		/* 10 .. 11  = MM_UL2 */
		/* 12 .. 13  = VX_UL */
		rval = abe->mixer.route_ul[reg + 2];
	}

	for (i = 0; i < ARRAY_SIZE(router); i++) {
		if (router[i] == rval) {
			ucontrol->value.integer.value[0] = i;
			return 0;
		}
	}

	return 1;
}
开发者ID:koh523,项目名称:kernel-pandaboard-ES-RevB3,代码行数:30,代码来源:omap-abe-mixer.c


示例15: omap_abe_set_pdm_dl1_gains

/* set optimum DL1 output path gain for ABE -> McPDM -> twl6040 */
static int omap_abe_set_pdm_dl1_gains(struct snd_soc_dapm_context *dapm)
{
	int gain_dB = 0, gain;
	struct snd_soc_card *card = dapm->card;
	struct omap_abe_data *abe_data = snd_soc_card_get_drvdata(card);
	struct snd_soc_codec *codec = abe_data->twl6040_codec;
	struct snd_soc_platform *platform = abe_data->abe_platform;
	struct omap_abe *abe = snd_soc_platform_get_drvdata(platform);

	if (codec) {
#if !defined(CONFIG_SND_OMAP_SOC_ABE_DL2)
		gain_dB = twl6040_get_dl2_gain(codec);
#endif
		if (!gain_dB)
			gain_dB = twl6040_get_dl1_gain(codec);
	}

	switch (gain_dB) {
	case -8:
		gain = GAIN_M8dB;
		break;
	case -7:
		gain = GAIN_M7dB;
		break;
	case -1:
		gain = GAIN_M1dB;
		break;
	default:
		gain = GAIN_0dB;
		break;
	}
	omap_aess_write_gain(abe->aess, OMAP_AESS_GAIN_DL1_LEFT, gain);
	omap_aess_write_gain(abe->aess, OMAP_AESS_GAIN_DL1_RIGHT, gain);
	return 0;
}
开发者ID:robacklin,项目名称:omap-android,代码行数:36,代码来源:omap-abe-twl6040.c


示例16: mt_pcm_mrgrx_close

static int mt_pcm_mrgrx_close(struct snd_pcm_substream *substream)
{
	struct snd_soc_pcm_runtime *rtd = substream->private_data;
	struct mt_pcm_mrgrx_priv *priv = snd_soc_platform_get_drvdata(rtd->platform);

	pr_debug("%s\n", __func__);

	mtk_wcn_cmb_stub_audio_ctrl((CMB_STUB_AIF_X) CMB_STUB_AIF_0);

	mt_afe_disable_memory_path(MT_AFE_DIGITAL_BLOCK_MRG_I2S_OUT);
	if (mt_afe_get_memory_path_state(MT_AFE_DIGITAL_BLOCK_MRG_I2S_OUT) == false)
		mt_afe_disable_merge_i2s();

	mt_afe_disable_memory_path(MT_AFE_DIGITAL_BLOCK_I2S_OUT_DAC);
	if (mt_afe_get_memory_path_state(MT_AFE_DIGITAL_BLOCK_I2S_OUT_DAC) == false)
		mt_afe_disable_i2s_dac();

	mt_afe_set_connection(INTER_DISCONNECT, INTER_CONN_I15, INTER_CONN_O13);
	mt_afe_set_connection(INTER_DISCONNECT, INTER_CONN_I16, INTER_CONN_O14);

	mt_afe_set_connection(INTER_DISCONNECT, INTER_CONN_I10, INTER_CONN_O03);
	mt_afe_set_connection(INTER_DISCONNECT, INTER_CONN_I11, INTER_CONN_O04);

	mt_afe_enable_afe(false);

	mt_afe_dac_clk_off();
	mt_afe_main_clk_off();
	priv->prepare_done = false;
	return 0;
}
开发者ID:P-D-A,项目名称:android_kernel_lge_mt6753,代码行数:30,代码来源:mt_afe_pcm_mrgrx.c


示例17: msm_compr_volume_put

static int msm_compr_volume_put(struct snd_kcontrol *kcontrol,
				struct snd_ctl_elem_value *ucontrol)
{
	struct snd_soc_platform *platform = snd_kcontrol_chip(kcontrol);
	unsigned long fe_id = kcontrol->private_value;
	struct msm_compr_pdata *pdata = (struct msm_compr_pdata *)
			snd_soc_platform_get_drvdata(platform);
	struct snd_compr_stream *cstream = NULL;
	uint32_t *volume = NULL;

	if (fe_id >= MSM_FRONTEND_DAI_MAX) {
		pr_err("%s Received out of bounds fe_id %lu\n",
			__func__, fe_id);
		return -EINVAL;
	}

	cstream = pdata->cstream[fe_id];
	volume = pdata->volume[fe_id];

	volume[0] = ucontrol->value.integer.value[0];
	volume[1] = ucontrol->value.integer.value[1];
	pr_debug("%s: fe_id %lu left_vol %d right_vol %d\n",
		 __func__, fe_id, volume[0], volume[1]);
	if (cstream)
		msm_compr_set_volume(cstream, volume[0], volume[1]);
	return 0;
}
开发者ID:LGaljo,项目名称:android_kernel_samsung_s3ve3g,代码行数:27,代码来源:msm-compress-q6-v2.c


示例18: aess_close

static int aess_close(struct snd_pcm_substream *substream)
{
	struct snd_soc_pcm_runtime *rtd = substream->private_data;
	struct snd_soc_platform *platform = rtd->platform;
	struct omap_abe *abe = snd_soc_platform_get_drvdata(platform);
	struct snd_soc_dai *dai = rtd->cpu_dai;

	dev_dbg(dai->dev, "%s: %s\n", __func__, dai->name);

	mutex_lock(&abe->mutex);

	if (!--abe->active) {
		omap_aess_disable_irq(abe->aess);
		abe_pm_save_context(abe);
		omap_abe_pm_shutdown(platform);
	} else {
		/* Only scale OPP level
		 * if ABE is still active */
		abe_opp_recalc_level(abe);
	}
	omap_abe_pm_runtime_put_sync(abe);

	mutex_unlock(&abe->mutex);
	return 0;
}
开发者ID:robacklin,项目名称:omap-android,代码行数:25,代码来源:omap-abe-mmap.c


示例19: snd_soc_platform_get_drvdata

/*
 * cpe_get_private_data: obtain ASoC platform driver private data
 * @substream: ASoC substream for which private data to be obtained
 */
static struct cpe_priv *cpe_get_private_data(
	struct snd_pcm_substream *substream)
{
	struct snd_soc_pcm_runtime *rtd = substream->private_data;
	struct snd_soc_platform *platform = rtd->platform;

	return snd_soc_platform_get_drvdata(platform);
}
开发者ID:StarKissed,项目名称:Note-4-AEL-Kernel,代码行数:12,代码来源:msm-cpe-lsm.c


示例20: lpe_mixer_headset_get

static int lpe_mixer_headset_get(struct snd_kcontrol *kcontrol,
                                 struct snd_ctl_elem_value *ucontrol)
{
    struct snd_soc_platform *platform = snd_kcontrol_chip(kcontrol);
    struct sst_data *sst = snd_soc_platform_get_drvdata(platform);

    ucontrol->value.integer.value[0] = sst->lpe_mixer_input_hs;
    return 0;
}
开发者ID:primiano,项目名称:edison-kernel,代码行数:9,代码来源:controls_v1.c



注:本文中的snd_soc_platform_get_drvdata函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ snd_soc_read函数代码示例发布时间:2022-05-30
下一篇:
C++ snd_soc_kcontrol_codec函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap