Commit 3c9a3203 authored by Harvey Harrison's avatar Harvey Harrison Committed by Takashi Iwai

[ALSA] sound: hda: missing includes of hda_patch.h

Move the array declaration to hda_codec.c where it is used and add includes
where the individual presets are declared.

Fixes the following sparse warnings:
sound/pci/hda/patch_realtek.c:13744:25: warning: symbol 'snd_hda_preset_realtek' was not declared. Should it be static?
sound/pci/hda/patch_cmedia.c:729:25: warning: symbol 'snd_hda_preset_cmedia' was not declared. Should it be static?
sound/pci/hda/patch_analog.c:3656:25: warning: symbol 'snd_hda_preset_analog' was not declared. Should it be static?
sound/pci/hda/patch_sigmatel.c:3995:25: warning: symbol 'snd_hda_preset_sigmatel' was not declared. Should it be static?
sound/pci/hda/patch_si3054.c:286:25: warning: symbol 'snd_hda_preset_si3054' was not declared. Should it be static?
sound/pci/hda/patch_atihdmi.c:156:25: warning: symbol 'snd_hda_preset_atihdmi' was not declared. Should it be static?
sound/pci/hda/patch_conexant.c:1721:25: warning: symbol 'snd_hda_preset_conexant' was not declared. Should it be static?
sound/pci/hda/patch_via.c:1962:25: warning: symbol 'snd_hda_preset_via' was not declared. Should it be static?
Signed-off-by: default avatarHarvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 64ed0dfd
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include <sound/initval.h> #include <sound/initval.h>
#include "hda_local.h" #include "hda_local.h"
#include <sound/hda_hwdep.h> #include <sound/hda_hwdep.h>
#include "hda_patch.h" /* codec presets */
#ifdef CONFIG_SND_HDA_POWER_SAVE #ifdef CONFIG_SND_HDA_POWER_SAVE
/* define this option here to hide as static */ /* define this option here to hide as static */
...@@ -68,9 +69,33 @@ static struct hda_vendor_id hda_vendor_ids[] = { ...@@ -68,9 +69,33 @@ static struct hda_vendor_id hda_vendor_ids[] = {
{} /* terminator */ {} /* terminator */
}; };
/* codec presets */ static const struct hda_codec_preset *hda_preset_tables[] = {
#include "hda_patch.h" #ifdef CONFIG_SND_HDA_CODEC_REALTEK
snd_hda_preset_realtek,
#endif
#ifdef CONFIG_SND_HDA_CODEC_CMEDIA
snd_hda_preset_cmedia,
#endif
#ifdef CONFIG_SND_HDA_CODEC_ANALOG
snd_hda_preset_analog,
#endif
#ifdef CONFIG_SND_HDA_CODEC_SIGMATEL
snd_hda_preset_sigmatel,
#endif
#ifdef CONFIG_SND_HDA_CODEC_SI3054
snd_hda_preset_si3054,
#endif
#ifdef CONFIG_SND_HDA_CODEC_ATIHDMI
snd_hda_preset_atihdmi,
#endif
#ifdef CONFIG_SND_HDA_CODEC_CONEXANT
snd_hda_preset_conexant,
#endif
#ifdef CONFIG_SND_HDA_CODEC_VIA
snd_hda_preset_via,
#endif
NULL
};
#ifdef CONFIG_SND_HDA_POWER_SAVE #ifdef CONFIG_SND_HDA_POWER_SAVE
static void hda_power_work(struct work_struct *work); static void hda_power_work(struct work_struct *work);
......
...@@ -18,31 +18,3 @@ extern struct hda_codec_preset snd_hda_preset_atihdmi[]; ...@@ -18,31 +18,3 @@ extern struct hda_codec_preset snd_hda_preset_atihdmi[];
extern struct hda_codec_preset snd_hda_preset_conexant[]; extern struct hda_codec_preset snd_hda_preset_conexant[];
/* VIA codecs */ /* VIA codecs */
extern struct hda_codec_preset snd_hda_preset_via[]; extern struct hda_codec_preset snd_hda_preset_via[];
static const struct hda_codec_preset *hda_preset_tables[] = {
#ifdef CONFIG_SND_HDA_CODEC_REALTEK
snd_hda_preset_realtek,
#endif
#ifdef CONFIG_SND_HDA_CODEC_CMEDIA
snd_hda_preset_cmedia,
#endif
#ifdef CONFIG_SND_HDA_CODEC_ANALOG
snd_hda_preset_analog,
#endif
#ifdef CONFIG_SND_HDA_CODEC_SIGMATEL
snd_hda_preset_sigmatel,
#endif
#ifdef CONFIG_SND_HDA_CODEC_SI3054
snd_hda_preset_si3054,
#endif
#ifdef CONFIG_SND_HDA_CODEC_ATIHDMI
snd_hda_preset_atihdmi,
#endif
#ifdef CONFIG_SND_HDA_CODEC_CONEXANT
snd_hda_preset_conexant,
#endif
#ifdef CONFIG_SND_HDA_CODEC_VIA
snd_hda_preset_via,
#endif
NULL
};
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include <sound/core.h> #include <sound/core.h>
#include "hda_codec.h" #include "hda_codec.h"
#include "hda_local.h" #include "hda_local.h"
#include "hda_patch.h"
struct ad198x_spec { struct ad198x_spec {
struct snd_kcontrol_new *mixers[5]; struct snd_kcontrol_new *mixers[5];
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <sound/core.h> #include <sound/core.h>
#include "hda_codec.h" #include "hda_codec.h"
#include "hda_local.h" #include "hda_local.h"
#include "hda_patch.h"
struct atihdmi_spec { struct atihdmi_spec {
struct hda_multi_out multiout; struct hda_multi_out multiout;
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include <sound/core.h> #include <sound/core.h>
#include "hda_codec.h" #include "hda_codec.h"
#include "hda_local.h" #include "hda_local.h"
#include "hda_patch.h"
#define NUM_PINS 11 #define NUM_PINS 11
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <sound/core.h> #include <sound/core.h>
#include "hda_codec.h" #include "hda_codec.h"
#include "hda_local.h" #include "hda_local.h"
#include "hda_patch.h"
#define CXT_PIN_DIR_IN 0x00 #define CXT_PIN_DIR_IN 0x00
#define CXT_PIN_DIR_OUT 0x01 #define CXT_PIN_DIR_OUT 0x01
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include <sound/core.h> #include <sound/core.h>
#include "hda_codec.h" #include "hda_codec.h"
#include "hda_local.h" #include "hda_local.h"
#include "hda_patch.h"
#define ALC880_FRONT_EVENT 0x01 #define ALC880_FRONT_EVENT 0x01
#define ALC880_DCVOL_EVENT 0x02 #define ALC880_DCVOL_EVENT 0x02
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include <sound/core.h> #include <sound/core.h>
#include "hda_codec.h" #include "hda_codec.h"
#include "hda_local.h" #include "hda_local.h"
#include "hda_patch.h"
/* si3054 verbs */ /* si3054 verbs */
#define SI3054_VERB_READ_NODE 0x900 #define SI3054_VERB_READ_NODE 0x900
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include <sound/asoundef.h> #include <sound/asoundef.h>
#include "hda_codec.h" #include "hda_codec.h"
#include "hda_local.h" #include "hda_local.h"
#include "hda_patch.h"
#define NUM_CONTROL_ALLOC 32 #define NUM_CONTROL_ALLOC 32
#define STAC_PWR_EVENT 0x20 #define STAC_PWR_EVENT 0x20
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
#include <sound/core.h> #include <sound/core.h>
#include "hda_codec.h" #include "hda_codec.h"
#include "hda_local.h" #include "hda_local.h"
#include "hda_patch.h"
/* amp values */ /* amp values */
#define AMP_VAL_IDX_SHIFT 19 #define AMP_VAL_IDX_SHIFT 19
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment