Commit 351892a8 authored by Takashi Iwai's avatar Takashi Iwai

Merge branch 'topic/hda' into for-next

parents d2208ca0 0e24dbb7
...@@ -3,7 +3,6 @@ snd-hda-intel-objs := hda_intel.o ...@@ -3,7 +3,6 @@ snd-hda-intel-objs := hda_intel.o
snd-hda-intel-$(CONFIG_SND_HDA_I915) += hda_i915.o snd-hda-intel-$(CONFIG_SND_HDA_I915) += hda_i915.o
snd-hda-codec-y := hda_codec.o hda_jack.o hda_auto_parser.o snd-hda-codec-y := hda_codec.o hda_jack.o hda_auto_parser.o
snd-hda-codec-$(CONFIG_SND_HDA_GENERIC) += hda_generic.o
snd-hda-codec-$(CONFIG_PROC_FS) += hda_proc.o snd-hda-codec-$(CONFIG_PROC_FS) += hda_proc.o
snd-hda-codec-$(CONFIG_SND_HDA_HWDEP) += hda_hwdep.o snd-hda-codec-$(CONFIG_SND_HDA_HWDEP) += hda_hwdep.o
snd-hda-codec-$(CONFIG_SND_HDA_INPUT_BEEP) += hda_beep.o snd-hda-codec-$(CONFIG_SND_HDA_INPUT_BEEP) += hda_beep.o
...@@ -12,6 +11,7 @@ snd-hda-codec-$(CONFIG_SND_HDA_INPUT_BEEP) += hda_beep.o ...@@ -12,6 +11,7 @@ snd-hda-codec-$(CONFIG_SND_HDA_INPUT_BEEP) += hda_beep.o
CFLAGS_hda_codec.o := -I$(src) CFLAGS_hda_codec.o := -I$(src)
CFLAGS_hda_intel.o := -I$(src) CFLAGS_hda_intel.o := -I$(src)
snd-hda-codec-generic-objs := hda_generic.o
snd-hda-codec-realtek-objs := patch_realtek.o snd-hda-codec-realtek-objs := patch_realtek.o
snd-hda-codec-cmedia-objs := patch_cmedia.o snd-hda-codec-cmedia-objs := patch_cmedia.o
snd-hda-codec-analog-objs := patch_analog.o snd-hda-codec-analog-objs := patch_analog.o
...@@ -28,6 +28,9 @@ snd-hda-codec-hdmi-objs := patch_hdmi.o hda_eld.o ...@@ -28,6 +28,9 @@ snd-hda-codec-hdmi-objs := patch_hdmi.o hda_eld.o
obj-$(CONFIG_SND_HDA_INTEL) := snd-hda-codec.o obj-$(CONFIG_SND_HDA_INTEL) := snd-hda-codec.o
# codec drivers (note: CONFIG_SND_HDA_CODEC_XXX are booleans) # codec drivers (note: CONFIG_SND_HDA_CODEC_XXX are booleans)
ifdef CONFIG_SND_HDA_GENERIC
obj-$(CONFIG_SND_HDA_INTEL) += snd-hda-codec-generic.o
endif
ifdef CONFIG_SND_HDA_CODEC_REALTEK ifdef CONFIG_SND_HDA_CODEC_REALTEK
obj-$(CONFIG_SND_HDA_INTEL) += snd-hda-codec-realtek.o obj-$(CONFIG_SND_HDA_INTEL) += snd-hda-codec-realtek.o
endif endif
......
This diff is collapsed.
...@@ -673,6 +673,7 @@ struct hda_bus { ...@@ -673,6 +673,7 @@ struct hda_bus {
/* codec linked list */ /* codec linked list */
struct list_head codec_list; struct list_head codec_list;
unsigned int num_codecs;
/* link caddr -> codec */ /* link caddr -> codec */
struct hda_codec *caddr_tbl[HDA_MAX_CODEC_ADDRESS + 1]; struct hda_codec *caddr_tbl[HDA_MAX_CODEC_ADDRESS + 1];
...@@ -683,6 +684,9 @@ struct hda_bus { ...@@ -683,6 +684,9 @@ struct hda_bus {
struct hda_bus_unsolicited *unsol; struct hda_bus_unsolicited *unsol;
char workq_name[16]; char workq_name[16];
struct workqueue_struct *workq; /* common workqueue for codecs */ struct workqueue_struct *workq; /* common workqueue for codecs */
#ifdef CONFIG_PM
struct workqueue_struct *pm_wq; /* workqueue to parallel codec PM */
#endif
/* assigned PCMs */ /* assigned PCMs */
DECLARE_BITMAP(pcm_dev_bits, SNDRV_PCM_DEVICES); DECLARE_BITMAP(pcm_dev_bits, SNDRV_PCM_DEVICES);
...@@ -834,6 +838,7 @@ struct hda_codec { ...@@ -834,6 +838,7 @@ struct hda_codec {
/* detected preset */ /* detected preset */
const struct hda_codec_preset *preset; const struct hda_codec_preset *preset;
struct module *owner; struct module *owner;
int (*parser)(struct hda_codec *codec);
const char *vendor_name; /* codec vendor name */ const char *vendor_name; /* codec vendor name */
const char *chip_name; /* codec chip name */ const char *chip_name; /* codec chip name */
const char *modelname; /* model name for preset */ const char *modelname; /* model name for preset */
...@@ -907,7 +912,7 @@ struct hda_codec { ...@@ -907,7 +912,7 @@ struct hda_codec {
#ifdef CONFIG_PM #ifdef CONFIG_PM
unsigned int power_on :1; /* current (global) power-state */ unsigned int power_on :1; /* current (global) power-state */
unsigned int d3_stop_clk:1; /* support D3 operation without BCLK */ unsigned int d3_stop_clk:1; /* support D3 operation without BCLK */
unsigned int pm_down_notified:1; /* PM notified to controller */ unsigned int pm_up_notified:1; /* PM notified to controller */
unsigned int in_pm:1; /* suspend/resume being performed */ unsigned int in_pm:1; /* suspend/resume being performed */
int power_transition; /* power-state in transition */ int power_transition; /* power-state in transition */
int power_count; /* current (global) power refcount */ int power_count; /* current (global) power refcount */
...@@ -916,6 +921,7 @@ struct hda_codec { ...@@ -916,6 +921,7 @@ struct hda_codec {
unsigned long power_off_acct; unsigned long power_off_acct;
unsigned long power_jiffies; unsigned long power_jiffies;
spinlock_t power_lock; spinlock_t power_lock;
struct work_struct pm_work; /* task to parallel multi-codec PM */
#endif #endif
/* filter the requested power state per nid */ /* filter the requested power state per nid */
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include <linux/ctype.h> #include <linux/ctype.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/bitops.h> #include <linux/bitops.h>
#include <linux/module.h>
#include <sound/core.h> #include <sound/core.h>
#include <sound/jack.h> #include <sound/jack.h>
#include "hda_codec.h" #include "hda_codec.h"
...@@ -5291,3 +5292,6 @@ int snd_hda_parse_generic_codec(struct hda_codec *codec) ...@@ -5291,3 +5292,6 @@ int snd_hda_parse_generic_codec(struct hda_codec *codec)
return err; return err;
} }
EXPORT_SYMBOL_HDA(snd_hda_parse_generic_codec); EXPORT_SYMBOL_HDA(snd_hda_parse_generic_codec);
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Generic HD-audio codec parser");
...@@ -3978,7 +3978,7 @@ static DEFINE_PCI_DEVICE_TABLE(azx_ids) = { ...@@ -3978,7 +3978,7 @@ static DEFINE_PCI_DEVICE_TABLE(azx_ids) = {
.driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH_NOPM }, .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH_NOPM },
/* Panther Point */ /* Panther Point */
{ PCI_DEVICE(0x8086, 0x1e20), { PCI_DEVICE(0x8086, 0x1e20),
.driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH_NOPM }, .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH },
/* Lynx Point */ /* Lynx Point */
{ PCI_DEVICE(0x8086, 0x8c20), { PCI_DEVICE(0x8086, 0x8c20),
.driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH }, .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH },
......
...@@ -352,14 +352,8 @@ int snd_hda_multi_out_analog_cleanup(struct hda_codec *codec, ...@@ -352,14 +352,8 @@ int snd_hda_multi_out_analog_cleanup(struct hda_codec *codec,
/* /*
* generic codec parser * generic codec parser
*/ */
#ifdef CONFIG_SND_HDA_GENERIC
int snd_hda_parse_generic_codec(struct hda_codec *codec); int snd_hda_parse_generic_codec(struct hda_codec *codec);
#else int snd_hda_parse_hdmi_codec(struct hda_codec *codec);
static inline int snd_hda_parse_generic_codec(struct hda_codec *codec)
{
return -ENODEV;
}
#endif
/* /*
* generic proc interface * generic proc interface
......
...@@ -1692,21 +1692,6 @@ static int hdmi_parse_codec(struct hda_codec *codec) ...@@ -1692,21 +1692,6 @@ static int hdmi_parse_codec(struct hda_codec *codec)
} }
} }
#ifdef CONFIG_PM
/* We're seeing some problems with unsolicited hot plug events on
* PantherPoint after S3, if this is not enabled */
if (codec->vendor_id == 0x80862806)
codec->bus->power_keep_link_on = 1;
/*
* G45/IbexPeak don't support EPSS: the unsolicited pin hot plug event
* can be lost and presence sense verb will become inaccurate if the
* HDA link is powered off at hot plug or hw initialization time.
*/
else if (!(snd_hda_param_read(codec, codec->afg, AC_PAR_POWER_STATE) &
AC_PWRST_EPSS))
codec->bus->power_keep_link_on = 1;
#endif
return 0; return 0;
} }
...@@ -3213,6 +3198,15 @@ static int patch_via_hdmi(struct hda_codec *codec) ...@@ -3213,6 +3198,15 @@ static int patch_via_hdmi(struct hda_codec *codec)
return patch_simple_hdmi(codec, VIAHDMI_CVT_NID, VIAHDMI_PIN_NID); return patch_simple_hdmi(codec, VIAHDMI_CVT_NID, VIAHDMI_PIN_NID);
} }
/*
* called from hda_codec.c for generic HDMI support
*/
int snd_hda_parse_hdmi_codec(struct hda_codec *codec)
{
return patch_generic_hdmi(codec);
}
EXPORT_SYMBOL_HDA(snd_hda_parse_hdmi_codec);
/* /*
* patch entries * patch entries
*/ */
......
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