Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7641753d authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ASoC: qdsp6v2: Remove Eagle code"

parents d157957e dce0f818
Loading
Loading
Loading
Loading
+5 −61
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@
#include "q6audio_common.h"
#include "audio_utils_aio.h"
#include <sound/msm-audio-effects-q6-v2.h>
#include <sound/msm-dts-eagle.h>

#define MAX_CHANNELS_SUPPORTED		8
#define WAIT_TIMEDOUT_DURATION_SECS	1
@@ -53,31 +52,11 @@ static void audio_effects_init_pp(struct audio_client *ac)
		pr_err("%s: audio client null to init pp\n", __func__);
		return;
	}
	switch (ac->topology) {
	case ASM_STREAM_POSTPROC_TOPO_ID_HPX_MASTER:

		ret = q6asm_set_softvolume_v2(ac, &softvol,
					      SOFT_VOLUME_INSTANCE_1);
		if (ret < 0)
			pr_err("%s: Send SoftVolume1 Param failed ret=%d\n",
				__func__, ret);
		ret = q6asm_set_softvolume_v2(ac, &softvol,
					      SOFT_VOLUME_INSTANCE_2);
		if (ret < 0)
			pr_err("%s: Send SoftVolume2 Param failed ret=%d\n",
				 __func__, ret);

		msm_dts_eagle_init_master_module(ac);

		break;
	default:
	ret = q6asm_set_softvolume_v2(ac, &softvol,
				      SOFT_VOLUME_INSTANCE_1);
	if (ret < 0)
		pr_err("%s: Send SoftVolume Param failed ret=%d\n",
			__func__, ret);
		break;
	}
}

static void audio_effects_deinit_pp(struct audio_client *ac)
@@ -86,13 +65,6 @@ static void audio_effects_deinit_pp(struct audio_client *ac)
		pr_err("%s: audio client null to deinit pp\n", __func__);
		return;
	}
	switch (ac->topology) {
	case ASM_STREAM_POSTPROC_TOPO_ID_HPX_MASTER:
		msm_dts_eagle_deinit_master_module(ac);
		break;
	default:
		break;
	}
}

static void audio_effects_event_handler(uint32_t opcode, uint32_t token,
@@ -430,34 +402,6 @@ static long audio_effects_set_pp_param(struct q6audio_effects *effects,
			      &(effects->audio_effects.topo_switch_vol),
			      (long *)&values[1], SOFT_VOLUME_INSTANCE_2);
		break;
	case DTS_EAGLE_MODULE_ENABLE:
		pr_debug("%s: DTS_EAGLE_MODULE_ENABLE\n", __func__);
		if (msm_audio_effects_is_effmodule_supp_in_top(
			effects_module, effects->ac->topology)) {
			/*
			 * HPX->OFF: first disable HPX and then
			 * enable SA+
			 * HPX->ON: first disable SA+ and then
			 * enable HPX
			 */
			bool hpx_state = (bool)values[1];

			if (hpx_state)
				msm_audio_effects_enable_extn(effects->ac,
					&(effects->audio_effects),
					false);
			msm_dts_eagle_enable_asm(effects->ac,
				hpx_state,
				AUDPROC_MODULE_ID_DTS_HPX_PREMIX);
			msm_dts_eagle_enable_asm(effects->ac,
				hpx_state,
				AUDPROC_MODULE_ID_DTS_HPX_POSTMIX);
			if (!hpx_state)
				msm_audio_effects_enable_extn(effects->ac,
					&(effects->audio_effects),
					true);
		}
		break;
	default:
		pr_err("%s: Invalid effects config module\n", __func__);
		rc = -EINVAL;

include/sound/msm-dts-eagle.h

deleted100644 → 0
+0 −148
Original line number Diff line number Diff line
/* Copyright (c) 2014, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * only version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

#ifndef __MSM_DTS_EAGLE_H__
#define __MSM_DTS_EAGLE_H__

#include <linux/compat.h>
#include <sound/soc.h>
#include <sound/devdep_params.h>
#include <sound/q6asm-v2.h>

#ifdef CONFIG_COMPAT
enum {
	DTS_EAGLE_IOCTL_GET_CACHE_SIZE32 = _IOR(0xF2, 0, __s32),
	DTS_EAGLE_IOCTL_SET_CACHE_SIZE32 = _IOW(0xF2, 1, __s32),
	DTS_EAGLE_IOCTL_GET_PARAM32 = _IOR(0xF2, 2, compat_uptr_t),
	DTS_EAGLE_IOCTL_SET_PARAM32 = _IOW(0xF2, 3, compat_uptr_t),
	DTS_EAGLE_IOCTL_SET_CACHE_BLOCK32 =
				_IOW(0xF2, 4, compat_uptr_t),
	DTS_EAGLE_IOCTL_SET_ACTIVE_DEVICE32 =
				_IOW(0xF2, 5, compat_uptr_t),
	DTS_EAGLE_IOCTL_GET_LICENSE32 =
				_IOR(0xF2, 6, compat_uptr_t),
	DTS_EAGLE_IOCTL_SET_LICENSE32 =
				 _IOW(0xF2, 7, compat_uptr_t),
	DTS_EAGLE_IOCTL_SEND_LICENSE32 = _IOW(0xF2, 8, __s32),
	DTS_EAGLE_IOCTL_SET_VOLUME_COMMANDS32 = _IOW(0xF2, 9,
						     compat_uptr_t),
};
#endif

#ifdef CONFIG_DTS_EAGLE
void msm_dts_ion_memmap(struct param_outband *po_);
int msm_dts_eagle_enable_asm(struct audio_client *ac, u32 enable, int module);
int msm_dts_eagle_enable_adm(int port_id, int copp_idx, u32 enable);
void msm_dts_eagle_add_controls(struct snd_soc_platform *platform);
int msm_dts_eagle_set_stream_gain(struct audio_client *ac,
				  int lgain, int rgain);
int msm_dts_eagle_handle_asm(struct dts_eagle_param_desc *depd, char *buf,
			     bool for_pre, bool get, struct audio_client *ac,
			     struct param_outband *po);
int msm_dts_eagle_handle_adm(struct dts_eagle_param_desc *depd, char *buf,
			     bool for_pre, bool get);
int msm_dts_eagle_ioctl(unsigned int cmd, unsigned long arg);
int msm_dts_eagle_is_hpx_on(void);
int msm_dts_eagle_init_pre(struct audio_client *ac);
int msm_dts_eagle_deinit_pre(struct audio_client *ac);
int msm_dts_eagle_init_post(int port_id, int copp_id);
int msm_dts_eagle_deinit_post(int port_id, int topology);
int msm_dts_eagle_init_master_module(struct audio_client *ac);
int msm_dts_eagle_deinit_master_module(struct audio_client *ac);
int msm_dts_eagle_pcm_new(struct snd_soc_pcm_runtime *runtime);
void msm_dts_eagle_pcm_free(struct snd_pcm *pcm);
int msm_dts_eagle_compat_ioctl(unsigned int cmd, unsigned long arg);
#else
static inline void msm_dts_ion_memmap(struct param_outband *po_)
{
	pr_debug("%s\n", __func__);
}
static inline int msm_dts_eagle_enable_asm(struct audio_client *ac,
					   u32 enable, int module)
{
	return 0;
}
static inline int msm_dts_eagle_enable_adm(int port_id, int copp_idx,
					   u32 enable)
{
	return 0;
}
static inline void msm_dts_eagle_add_controls(struct snd_soc_platform *platform)
{
}
static inline int msm_dts_eagle_set_stream_gain(struct audio_client *ac,
						int lgain, int rgain)
{
	pr_debug("%s\n", __func__);
	return 0;
}
static inline int msm_dts_eagle_handle_asm(struct dts_eagle_param_desc *depd,
					   char *buf, bool for_pre, bool get,
					   struct audio_client *ac,
					   struct param_outband *po)
{
	return 0;
}
static inline int msm_dts_eagle_handle_adm(struct dts_eagle_param_desc *depd,
					   char *buf, bool for_pre, bool get)
{
	return 0;
}
static inline int msm_dts_eagle_ioctl(unsigned int cmd, unsigned long arg)
{
	return -EPERM;
}
static inline int msm_dts_eagle_is_hpx_on(void)
{
	return 0;
}
static inline int msm_dts_eagle_init_pre(struct audio_client *ac)
{
	return 0;
}
static inline int msm_dts_eagle_deinit_pre(struct audio_client *ac)
{
	return 0;
}
static inline int msm_dts_eagle_init_post(int port_id, int coppid)
{
	return 0;
}
static inline int msm_dts_eagle_deinit_post(int port_id, int topology)
{
	return 0;
}
static inline int msm_dts_eagle_init_master_module(struct audio_client *ac)
{
	return 0;
}
static inline int msm_dts_eagle_deinit_master_module(struct audio_client *ac)
{
	return 0;
}
static inline int msm_dts_eagle_pcm_new(struct snd_soc_pcm_runtime *runtime)
{
	pr_debug("%s\n", __func__);
	return 0;
}
static inline void msm_dts_eagle_pcm_free(struct snd_pcm *pcm)
{
	pr_debug("%s\n", __func__);
}
static inline int msm_dts_eagle_compat_ioctl(unsigned int cmd,
					unsigned long arg)
{
	return 0;
}
#endif

#endif
+2 −1
Original line number Diff line number Diff line
@@ -34,7 +34,6 @@ enum {
	ADM_AUDVOL_CAL,
	ADM_RTAC_INFO_CAL,
	ADM_RTAC_APR_CAL,
	ADM_DTS_EAGLE,
	ADM_SRS_TRUMEDIA,
	ADM_RTAC_AUDVOL_CAL,
	ADM_MAX_CAL_TYPES
@@ -164,4 +163,6 @@ int adm_get_sound_focus(int port_id, int copp_idx,
			struct sound_focus_param *soundFocusData);
int adm_get_source_tracking(int port_id, int copp_idx,
			    struct source_tracking_param *sourceTrackingData);
int adm_swap_speaker_channels(int port_id, int copp_idx, int sample_rate,
				bool spk_swap);
#endif /* __Q6_ADM_V2_H__ */
+31 −0
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
#include <linux/slab.h>
#include <linux/stringify.h>
#include <linux/of.h>
#include <linux/debugfs.h>
#include <linux/component.h>
#include <linux/dma-mapping.h>
#include <soc/qcom/ramdump.h>
@@ -182,6 +183,10 @@ struct wdsp_mgr_priv {
	struct work_struct ssr_work;
	u16 ready_status;
	struct completion ready_compl;

	/* Debugfs related */
	struct dentry *entry;
	bool panic_on_error;
};

static char *wdsp_get_ssr_type_string(enum wdsp_ssr_type type)
@@ -656,6 +661,12 @@ static void wdsp_collect_ramdumps(struct wdsp_mgr_priv *wdsp)
		goto err_read_dumps;
	}

	/*
	 * If panic_on_error flag is explicitly set through the debugfs,
	 * then cause a BUG here to aid debugging.
	 */
	BUG_ON(wdsp->panic_on_error);

	rd_seg.address = (unsigned long) wdsp->dump_data.rd_v_addr;
	rd_seg.size = img_section.size;
	rd_seg.v_address = wdsp->dump_data.rd_v_addr;
@@ -949,6 +960,22 @@ static int wdsp_mgr_compare_of(struct device *dev, void *data)
		 !strcmp(dev_name(dev), cmpnt->cdev_name)));
}

static void wdsp_mgr_debugfs_init(struct wdsp_mgr_priv *wdsp)
{
	wdsp->entry = debugfs_create_dir("wdsp_mgr", NULL);
	if (IS_ERR_OR_NULL(wdsp->entry))
		return;

	debugfs_create_bool("panic_on_error", 0644,
			    wdsp->entry, &wdsp->panic_on_error);
}

static void wdsp_mgr_debugfs_remove(struct wdsp_mgr_priv *wdsp)
{
	debugfs_remove_recursive(wdsp->entry);
	wdsp->entry = NULL;
}

static int wdsp_mgr_bind(struct device *dev)
{
	struct wdsp_mgr_priv *wdsp = dev_get_drvdata(dev);
@@ -978,6 +1005,8 @@ static int wdsp_mgr_bind(struct device *dev)
		}
	}

	wdsp_mgr_debugfs_init(wdsp);

	/* Schedule the work to download image if binding was successful. */
	if (!ret)
		schedule_work(&wdsp->load_fw_work);
@@ -993,6 +1022,8 @@ static void wdsp_mgr_unbind(struct device *dev)

	component_unbind_all(dev, wdsp->ops);

	wdsp_mgr_debugfs_remove(wdsp);

	if (wdsp->dump_data.rd_dev) {
		destroy_ramdump_device(wdsp->dump_data.rd_dev);
		wdsp->dump_data.rd_dev = NULL;
+2 −1
Original line number Diff line number Diff line
@@ -1292,7 +1292,7 @@ static int wcd_mbhc_initialise(struct wcd_mbhc *mbhc)
	wcd_program_btn_threshold(mbhc, false);


	init_completion(&mbhc->btn_press_compl);
	reinit_completion(&mbhc->btn_press_compl);

	WCD_MBHC_RSC_UNLOCK(mbhc);
	pr_debug("%s: leave\n", __func__);
@@ -1905,6 +1905,7 @@ int wcd_mbhc_init(struct wcd_mbhc *mbhc, struct snd_soc_codec *codec,
	}
	mutex_init(&mbhc->hphl_pa_lock);
	mutex_init(&mbhc->hphr_pa_lock);
	init_completion(&mbhc->btn_press_compl);

	/* Register event notifier */
	mbhc->nblock.notifier_call = wcd_event_notify;
Loading