similarity index 98%
rename from include/sound/hda_priv.h
rename to include/sound/hda_register.h
@@ -12,12 +12,8 @@
* more details.
*/
-#ifndef __SOUND_HDA_PRIV_H
-#define __SOUND_HDA_PRIV_H
-
-#include <linux/clocksource.h>
-#include <sound/core.h>
-#include <sound/pcm.h>
+#ifndef __SOUND_HDA_REGISTER_H
+#define __SOUND_HDA_REGISTER_H
/*
* registers
@@ -403,4 +399,4 @@ struct azx {
#define azx_sd_readb(chip, dev, reg) \
((chip)->ops->reg_readb((dev)->sd_addr + AZX_REG_##reg))
-#endif /* __SOUND_HDA_PRIV_H */
+#endif /* __SOUND_HDA_REGISTER_H */
similarity index 96%
rename from include/sound/hda_auto_parser.h
rename to include/sound/hdalib_auto_parser.h
@@ -9,8 +9,8 @@
* (at your option) any later version.
*/
-#ifndef __SOUND_HDA_AUTO_PARSER_H
-#define __SOUND_HDA_AUTO_PARSER_H
+#ifndef __SOUND_HDALIB_AUTO_PARSER_H
+#define __SOUND_HDALIB_AUTO_PARSER_H
/*
* Helper for automatic pin configuration
@@ -116,4 +116,4 @@ static inline const hda_nid_t *auto_cfg_speaker_pins(const struct auto_pin_cfg *
cfg->line_out_pins : cfg->speaker_pins;
}
-#endif /* __SOUND_HDA_AUTO_PARSER_H */
+#endif /* __SOUND_HDALIB_AUTO_PARSER_H */
similarity index 95%
rename from include/sound/hda_beep.h
rename to include/sound/hdalib_beep.h
@@ -19,10 +19,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#ifndef __SOUND_HDA_BEEP_H
-#define __SOUND_HDA_BEEP_H
+#ifndef __SOUND_HDALIB_BEEP_H
+#define __SOUND_HDALIB_BEEP_H
-#include "hda_codec.h"
+#include "hdalib_codec.h"
#define HDA_BEEP_MODE_OFF 0
#define HDA_BEEP_MODE_ON 1
similarity index 98%
rename from include/sound/hda_codec.h
rename to include/sound/hdalib_codec.h
@@ -1,8 +1,11 @@
/*
* Universal Interface for Intel High Definition Audio Codec
*
+ * Copyright (c) 2014 Intel Corporation
* Copyright (c) 2004 Takashi Iwai <tiwai@suse.de>
*
+ * Modified by: Lakshmi Vinnakota <lakshmi.n.vinnakota@intel.com>
+ *
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option)
@@ -12,14 +15,10 @@
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#ifndef __SOUND_HDA_CODEC_H
-#define __SOUND_HDA_CODEC_H
+#ifndef __SOUND_HDALIB_CODEC_H
+#define __SOUND_HDALIB_CODEC_H
#include <sound/info.h>
#include <sound/control.h>
@@ -687,4 +686,4 @@ snd_hda_codec_load_dsp_cleanup(struct hda_codec *codec,
struct snd_dma_buffer *dmab) {}
#endif
-#endif /* __SOUND_HDA_CODEC_H */
+#endif /* __SOUND_HDALIB_CODEC_H */
similarity index 90%
rename from include/sound/hda_controller.h
rename to include/sound/hdalib_controller.h
@@ -12,13 +12,14 @@
* more details.
*/
-#ifndef __SOUND_HDA_CONTROLLER_H
-#define __SOUND_HDA_CONTROLLER_H
+#ifndef __SOUND_HDALIB_CONTROLLER_H
+#define __SOUND_HDALIB_CONTROLLER_H
#include <sound/core.h>
#include <sound/initval.h>
-#include "hda_codec.h"
-#include "hda_priv.h"
+#include "hdalib_codec.h"
+#include "hdalib_controls.h"
+#include "hda_register.h"
/* PCM setup */
static inline struct azx_dev *get_azx_dev(struct snd_pcm_substream *substream)
@@ -53,4 +54,4 @@ int azx_init_stream(struct azx *chip);
void azx_notifier_register(struct azx *chip);
void azx_notifier_unregister(struct azx *chip);
-#endif /* __SOUND_HDA_CONTROLLER_H */
+#endif /* __SOUND_HDALIB_CONTROLLER_H */
similarity index 99%
rename from include/sound/hda_local.h
rename to include/sound/hdalib_controls.h
@@ -20,8 +20,8 @@
* Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#ifndef __SOUND_HDA_LOCAL_H
-#define __SOUND_HDA_LOCAL_H
+#ifndef __SOUND_HDALIB_CONTROLS_H
+#define __SOUND_HDALIB_CONTROLS_H
/* We abuse kcontrol_new.subdev field to pass the NID corresponding to
* the given new control. If id.subdev has a bit flag HDA_SUBDEV_NID_FLAG,
@@ -805,4 +805,4 @@ void snd_print_channel_allocation(int spk_alloc, char *buf, int buflen);
#define codec_info(codec, fmt, args...) dev_info(&(codec)->dev, fmt, ##args)
#define codec_dbg(codec, fmt, args...) dev_dbg(&(codec)->dev, fmt, ##args)
-#endif /* __SOUND_HDA_LOCAL_H */
+#endif /* __SOUND_HDALIB_CONTROLS_H */
similarity index 99%
rename from include/sound/hda_generic.h
rename to include/sound/hdalib_generic.h
@@ -9,8 +9,8 @@
* (at your option) any later version.
*/
-#ifndef __SOUND_HDA_GENERIC_H
-#define __SOUND_HDA_GENERIC_H
+#ifndef __SOUND_HDALIB_GENERIC_H
+#define __SOUND_HDALIB_GENERIC_H
/* table entry for multi-io paths */
struct hda_multi_io {
@@ -341,4 +341,4 @@ unsigned int snd_hda_gen_path_power_filter(struct hda_codec *codec,
hda_nid_t nid,
unsigned int power_state);
-#endif /* __SOUND_HDA_GENERIC_H */
+#endif /* __SOUND_HDALIB_GENERIC_H */
similarity index 95%
rename from include/sound/hda_hwdep.h
rename to include/sound/hdalib_hwdep.h
@@ -18,8 +18,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#ifndef __SOUND_HDA_HWDEP_H
-#define __SOUND_HDA_HWDEP_H
+#ifndef __SOUND_HDALIB_HWDEP_H
+#define __SOUND_HDALIB_HWDEP_H
#define HDA_HWDEP_VERSION ((1 << 16) | (0 << 8) | (0 << 0)) /* 1.0.0 */
similarity index 96%
rename from include/sound/hda_jack.h
rename to include/sound/hdalib_jack.h
@@ -9,8 +9,8 @@
* (at your option) any later version.
*/
-#ifndef __SOUND_HDA_JACK_H
-#define __SOUND_HDA_JACK_H
+#ifndef __SOUND_HDALIB_JACK_H
+#define __SOUND_HDALIB_JACK_H
#include <linux/err.h>
@@ -95,4 +95,4 @@ void snd_hda_jack_unsol_event(struct hda_codec *codec, unsigned int res);
void snd_hda_jack_poll_all(struct hda_codec *codec);
-#endif /* __SOUND_HDA_JACK_H */
+#endif /* __SOUND_HDALIB_JACK_H */
@@ -9,13 +9,14 @@
* (at your option) any later version.
*/
+#include <linux/module.h>
#include <linux/slab.h>
#include <linux/export.h>
#include <linux/sort.h>
#include <sound/core.h>
-#include <sound/hda_codec.h>
-#include <sound/hda_local.h>
-#include <sound/hda_auto_parser.h>
+#include <sound/hdalib_codec.h>
+#include <sound/hdalib_controls.h>
+#include <sound/hdalib_auto_parser.h>
/*
* Helper for automatic pin configuration
@@ -24,8 +24,10 @@
#include <linux/workqueue.h>
#include <linux/export.h>
#include <sound/core.h>
-#include <sound/hda_beep.h>
-#include <sound/hda_local.h>
+#include <sound/hdalib_codec.h>
+#include <sound/hdalib_controls.h>
+#include <sound/hdalib_auto_parser.h>
+#include <sound/hdalib_beep.h>
enum {
DIGBEEP_HZ_STEP = 46875, /* 46.875 Hz */
@@ -1,8 +1,10 @@
/*
* Universal Interface for Intel High Definition Audio Codec
*
+ * Copyright (c) 2014 Intel Corporation
* Copyright (c) 2004 Takashi Iwai <tiwai@suse.de>
*
+ * Modified by: Lakshmi Vinnakota <lakshmi.n.vinnakota@intel.com>
*
* This driver is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -13,10 +15,6 @@
* 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.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <linux/mm.h>
@@ -27,15 +25,16 @@
#include <linux/module.h>
#include <linux/async.h>
#include <sound/core.h>
-#include <sound/hda_codec.h>
#include <sound/asoundef.h>
#include <sound/tlv.h>
#include <sound/initval.h>
#include <sound/jack.h>
-#include <sound/hda_local.h>
-#include <sound/hda_beep.h>
-#include <sound/hda_jack.h>
-#include <sound/hda_hwdep.h>
+#include <sound/hdalib_codec.h>
+#include <sound/hdalib_controls.h>
+#include <sound/hdalib_auto_parser.h>
+#include <sound/hdalib_beep.h>
+#include <sound/hdalib_jack.h>
+#include <sound/hdalib_hwdep.h>
#define CREATE_TRACE_POINTS
#include "hda_trace.h"
@@ -1,12 +1,15 @@
/*
*
- * Implementation of primary alsa driver code base for Intel HD Audio.
+ * Implementation of Common HDA driver funcitons for Intel HD Audio.
*
+ * Copyright (c) 2014 Intel Corporation
* Copyright(c) 2004 Intel Corporation. All rights reserved.
*
* Copyright (c) 2004 Takashi Iwai <tiwai@suse.de>
* PeiSen Hou <pshou@realtek.com.tw>
*
+ * Modified by: KP Jeeja <jeeja.kp@intel.com>
+ *
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option)
@@ -30,8 +33,9 @@
#include <linux/reboot.h>
#include <sound/core.h>
#include <sound/initval.h>
-#include <sound/hda_priv.h>
-#include <sound/hda_controller.h>
+#include <sound/hdalib_controller.h>
+#include <sound/hda_register.h>
+
#define CREATE_TRACE_POINTS
#include "hda_intel_trace.h"
@@ -26,8 +26,8 @@
#include <linux/slab.h>
#include <sound/core.h>
#include <asm/unaligned.h>
-#include <sound/hda_codec.h>
-#include <sound/hda_local.h>
+#include <sound/hdalib_codec.h>
+#include <sound/hdalib_controls.h>
enum eld_versions {
ELD_VER_CEA_861D = 2,
@@ -32,12 +32,13 @@
#include <sound/core.h>
#include <sound/jack.h>
#include <sound/tlv.h>
-#include <sound/hda_codec.h>
-#include <sound/hda_local.h>
-#include <sound/hda_auto_parser.h>
-#include <sound/hda_jack.h>
-#include <sound/hda_beep.h>
-#include <sound/hda_generic.h>
+#include <sound/control.h>
+#include <sound/hdalib_codec.h>
+#include <sound/hdalib_controls.h>
+#include <sound/hdalib_auto_parser.h>
+#include <sound/hdalib_beep.h>
+#include <sound/hdalib_jack.h>
+#include <sound/hdalib_generic.h>
/**
@@ -22,9 +22,9 @@
#include <linux/slab.h>
#include <linux/compat.h>
#include <sound/core.h>
-#include <sound/hda_codec.h>
-#include <sound/hda_local.h>
-#include <sound/hda_hwdep.h>
+#include <sound/hdalib_codec.h>
+#include <sound/hdalib_controls.h>
+#include <sound/hdalib_hwdep.h>
#include <sound/minors.h>
/*
@@ -15,10 +15,10 @@
#include <sound/core.h>
#include <sound/control.h>
#include <sound/jack.h>
-#include <sound/hda_codec.h>
-#include <sound/hda_local.h>
-#include <sound/hda_auto_parser.h>
-#include <sound/hda_jack.h>
+#include <sound/hdalib_codec.h>
+#include <sound/hdalib_controls.h>
+#include <sound/hdalib_auto_parser.h>
+#include <sound/hdalib_jack.h>
/**
* is_jack_detectable - Check whether the given pin is jack-detectable
@@ -25,8 +25,9 @@
#include <linux/slab.h>
#include <sound/core.h>
#include <linux/module.h>
-#include <sound/hda_codec.h>
-#include <sound/hda_local.h>
+#include <sound/hdalib_codec.h>
+#include <sound/hdalib_controls.h>
+#include <sound/hdalib_auto_parser.h>
static int dump_coef = -1;
module_param(dump_coef, int, 0644);
@@ -14,10 +14,10 @@
#include <linux/string.h>
#include <linux/export.h>
#include <sound/core.h>
-#include <sound/hda_codec.h>
-#include <sound/hda_local.h>
-#include <sound/hda_hwdep.h>
#include <sound/minors.h>
+#include <sound/hdalib_codec.h>
+#include <sound/hdalib_hwdep.h>
+#include <sound/hdalib_controls.h>
/* hint string pair */
struct hda_hint {
@@ -20,7 +20,8 @@
#include <linux/module.h>
#include <sound/core.h>
#include <drm/i915_powerwell.h>
-#include <sound/hda_priv.h>
+#include <sound/hdalib_codec.h>
+#include <sound/hda_register.h>
#include "hda_i915.h"
/* Intel HSW/BDW display HDA controller Extended Mode registers.
@@ -60,9 +60,10 @@
#include <linux/vgaarb.h>
#include <linux/vga_switcheroo.h>
#include <linux/firmware.h>
-#include <sound/hda_codec.h>
-#include <sound/hda_controller.h>
-#include <sound/hda_priv.h>
+#include <sound/hdalib_codec.h>
+#include <sound/hdalib_controls.h>
+#include <sound/hdalib_controller.h>
+#include <sound/hda_register.h>
#include "hda_i915.h"
/* position fix mode */
@@ -37,9 +37,17 @@
#include <sound/jack.h>
#include <sound/asoundef.h>
#include <sound/tlv.h>
+#include <sound/hdalib_codec.h>
+#include <sound/hdalib_bus.h>
+#include <sound/hdalib_auto_parser.h>
+#include <sound/hdalib_controls.h>
+#include <sound/hdalib_jack.h>
+#include <sound/hdalib_generic.h>
+#include <sound/hdalib_hdmi.h>
#include "hda_codec.h"
+#include "hda_generic.h"
+#include "hda_bus.h"
#include "hda_local.h"
-#include "hda_jack.h"
static bool static_hdmi_pcm;
module_param(static_hdmi_pcm, bool, 0644);
@@ -31,11 +31,15 @@
#include <linux/module.h>
#include <sound/core.h>
#include <sound/jack.h>
+#include <sound/hdalib_codec.h>
+#include <sound/hdalib_bus.h>
+#include <sound/hdalib_auto_parser.h>
+#include <sound/hdalib_controls.h>
+#include <sound/hdalib_jack.h>
+#include <sound/hdalib_generic.h>
#include "hda_codec.h"
-#include "hda_local.h"
-#include "hda_auto_parser.h"
-#include "hda_jack.h"
#include "hda_generic.h"
+#include "hda_bus.h"
/* keep halting ALC5505 DSP, for power saving */
#define HALT_REALTEK_ALC5505