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

Commit 638affba authored by Casey Piper's avatar Casey Piper
Browse files

linux: Move hdmi audio codec header to common location



Move contents of msm_hdmi_audio_codec.h
directory to msm_hdmi.h in common linux
directory to remove platform dependence.

Change-Id: I6331073ba1e5e119770c5e8cb50f6ff677807292
Signed-off-by: default avatarCasey Piper <cpiper@codeaurora.org>
parent 563010bc
Loading
Loading
Loading
Loading
+0 −39
Original line number Diff line number Diff line
/* Copyright (c) 2012-2013, 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_HDMI_AUDIO_CODEC_H__
#define __MSM_HDMI_AUDIO_CODEC_H__

#include <linux/device.h>
#include <linux/platform_device.h>

struct msm_hdmi_audio_edid_blk {
	u8 *audio_data_blk;
	unsigned int audio_data_blk_size; /* in bytes */
	u8 *spk_alloc_data_blk;
	unsigned int spk_alloc_data_blk_size; /* in bytes */
};

struct msm_hdmi_audio_codec_ops {
	int (*audio_info_setup)(struct platform_device *pdev,
		u32 sample_rate, u32 num_of_channels,
		u32 channel_allocation, u32 level_shift,
		bool down_mix);
	int (*get_audio_edid_blk) (struct platform_device *pdev,
		struct msm_hdmi_audio_edid_blk *blk);
	int (*hdmi_cable_status) (struct platform_device *pdev, u32 vote);
};

int msm_hdmi_register_audio_codec(struct platform_device *pdev,
	struct msm_hdmi_audio_codec_ops *ops);

#endif /* __MSM_HDMI_AUDIO_CODEC_H__ */
+2 −2
Original line number Diff line number Diff line
/* Copyright (c) 2010-2012, The Linux Foundation. All rights reserved.
/* Copyright (c) 2010-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
@@ -13,7 +13,7 @@
#ifndef __HDMI_EDID_H__
#define __HDMI_EDID_H__

#include <mach/msm_hdmi_audio_codec.h>
#include <linux/msm_hdmi.h>
#include "mdss_hdmi_util.h"

struct hdmi_edid_init_data {
+0 −1
Original line number Diff line number Diff line
@@ -21,7 +21,6 @@
#include <linux/of_platform.h>
#include <linux/types.h>
#include <linux/msm_hdmi.h>
#include <mach/msm_hdmi_audio_codec.h>

#define REG_DUMP 0

+31 −2
Original line number Diff line number Diff line
@@ -14,6 +14,9 @@
#ifndef _MSM_HDMI_H_
#define _MSM_HDMI_H_

#include <linux/device.h>
#include <linux/platform_device.h>

/*
 * HDMI cable notify handler sturcture.
 * link A link for the linked list
@@ -26,6 +29,23 @@ struct hdmi_cable_notify {
	void (*hpd_notify) (struct hdmi_cable_notify *h);
};

struct msm_hdmi_audio_edid_blk {
	u8 *audio_data_blk;
	unsigned int audio_data_blk_size; /* in bytes */
	u8 *spk_alloc_data_blk;
	unsigned int spk_alloc_data_blk_size; /* in bytes */
};

struct msm_hdmi_audio_codec_ops {
	int (*audio_info_setup)(struct platform_device *pdev,
		u32 sample_rate, u32 num_of_channels,
		u32 channel_allocation, u32 level_shift,
		bool down_mix);
	int (*get_audio_edid_blk) (struct platform_device *pdev,
		struct msm_hdmi_audio_edid_blk *blk);
	int (*hdmi_cable_status) (struct platform_device *pdev, u32 vote);
};

#ifdef CONFIG_FB_MSM_MDSS_HDMI_PANEL
/*
 * Register for HDMI cable connect or disconnect notification.
@@ -42,16 +62,25 @@ int register_hdmi_cable_notification(
 */
int unregister_hdmi_cable_notification(
		struct hdmi_cable_notify *handler);

int msm_hdmi_register_audio_codec(struct platform_device *pdev,
	struct msm_hdmi_audio_codec_ops *ops);

#else
int register_hdmi_cable_notification(
static inline int register_hdmi_cable_notification(
		struct hdmi_cable_notify *handler) {
	return 0;
}

int unregister_hdmi_cable_notification(
static inline int unregister_hdmi_cable_notification(
		struct hdmi_cable_notify *handler) {
	return 0;
}

static inline int msm_hdmi_register_audio_codec(struct platform_device *pdev,
		struct msm_hdmi_audio_codec_ops *ops) {
	return 0;
}
#endif /* CONFIG_FB_MSM_MDSS_HDMI_PANEL */

#endif /*_MSM_HDMI_H_*/
+2 −2
Original line number Diff line number Diff line
/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-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
@@ -17,7 +17,7 @@
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/soc.h>
#include <mach/msm_hdmi_audio_codec.h>
#include <linux/msm_hdmi.h>

#define MSM_HDMI_PCM_RATES	SNDRV_PCM_RATE_48000