Yet more HD-audio restrucruing
cover Yet more HD-audio restrucruing
Hi,
this is the patchset I mentioned in the previous post -- moving some HD-audio core stuff into sound/hda/ directory. As of now, only the codec drivers are split to sound/hda/. The legacy bus (controller) driver still remains almost intact, but the split of the core controller driver is also planned, and will be finished hopefully before 4.1 merge window.
The original patches are found in topic/hda-core branch of sound git tree. The patches posted here are the ones rebased on top of the previous widget PM patches, and found in test/hda-core branch. Once when the widget PM patches get merged, I'll adjust this patchset on top of it.
Takashi
===
Takashi Iwai (7):
ALSA: hda - Make snd_hda_bus_type public
ALSA: hda - Move some codes up to hdac_bus struct
ALSA: hda - Move a part of hda_codec stuff into hdac_device
ALSA: hda - Add widget sysfs tree
ALSA: hda - Support indirect execution of verbs
ALSA: hda - Fix possible runtime PM refcount unbalance
ALSA: hda - Re-add tracepoints to HD-audio core driver
include/sound/hdaudio.h | 181 ++++++++++++ sound/Kconfig | 2 + sound/Makefile | 2 +- sound/hda/Kconfig | 2 + sound/hda/Makefile | 6 + sound/hda/hda_bus_type.c | 42 +++ sound/hda/hdac_bus.c | 186 +++++++++++++ sound/hda/hdac_device.c | 527 +++++++++++++++++++++++++++++++++++ sound/hda/hdac_sysfs.c | 404 +++++++++++++++++++++++++++ sound/hda/local.h | 23 ++ sound/hda/trace.c | 6 + sound/hda/trace.h | 62 +++++ sound/pci/hda/Kconfig | 1 + sound/pci/hda/Makefile | 1 - sound/pci/hda/hda_auto_parser.c | 33 ++- sound/pci/hda/hda_beep.c | 4 +- sound/pci/hda/hda_bind.c | 157 +++-------- sound/pci/hda/hda_codec.c | 600 +++++++++------------------------------- sound/pci/hda/hda_codec.h | 87 ++---- sound/pci/hda/hda_controller.c | 8 +- sound/pci/hda/hda_generic.c | 25 +- sound/pci/hda/hda_intel.c | 4 +- sound/pci/hda/hda_local.h | 16 +- sound/pci/hda/hda_proc.c | 42 +-- sound/pci/hda/hda_sysfs.c | 60 ++-- sound/pci/hda/hda_trace.h | 119 -------- sound/pci/hda/local.h | 39 +++ sound/pci/hda/patch_analog.c | 2 +- sound/pci/hda/patch_ca0132.c | 6 +- sound/pci/hda/patch_conexant.c | 20 +- sound/pci/hda/patch_hdmi.c | 20 +- sound/pci/hda/patch_realtek.c | 78 +++--- sound/pci/hda/patch_si3054.c | 6 +- sound/pci/hda/patch_sigmatel.c | 84 +++--- sound/pci/hda/patch_via.c | 23 +- sound/pci/hda/thinkpad_helper.c | 2 +- 36 files changed, 1895 insertions(+), 985 deletions(-) create mode 100644 include/sound/hdaudio.h create mode 100644 sound/hda/Kconfig create mode 100644 sound/hda/Makefile create mode 100644 sound/hda/hda_bus_type.c create mode 100644 sound/hda/hdac_bus.c create mode 100644 sound/hda/hdac_device.c create mode 100644 sound/hda/hdac_sysfs.c create mode 100644 sound/hda/local.h create mode 100644 sound/hda/trace.c create mode 100644 sound/hda/trace.h delete mode 100644 sound/pci/hda/hda_trace.h create mode 100644 sound/pci/hda/local.h
Signature · 1 line
2.3.3
PATCH 1/7 ALSA: hda - Make snd_hda_bus_type public
Define the common hd-audio driver and device types to bind over snd_hda_bus_type publicly. This allows to implement other type of device and driver code over hd-audio bus.
Now both struct hda_codec and struct hda_codec_driver inherit these new struct hdac_device and struct hdac_driver, respectively.
The bus registration is done in subsys_initcall() to assure it before any other driver registrations.
--- include/sound/hdaudio.h | 42 ++++++++++++++++++++++++++++++++++++++++++ sound/Kconfig | 2 ++ sound/Makefile | 2 +- sound/hda/Kconfig | 2 ++ sound/hda/Makefile | 3 +++ sound/hda/hda_bus_type.c | 42 ++++++++++++++++++++++++++++++++++++++++++ sound/pci/hda/Kconfig | 1 + sound/pci/hda/hda_bind.c | 47 ++++++++++++++--------------------------------- sound/pci/hda/hda_codec.c | 1 + sound/pci/hda/hda_codec.h | 11 +++++------ 10 files changed, 113 insertions(+), 40 deletions(-) create mode 100644 include/sound/hdaudio.h create mode 100644 sound/hda/Kconfig create mode 100644 sound/hda/Makefile create mode 100644 sound/hda/hda_bus_type.c
include/sound/hdaudio.h new file +42 -0
@@ -0,0 +1,42 @@ +/* +* HD-audio core stuff +*/ + +#ifndef __SOUND_HDAUDIO_H +#define __SOUND_HDAUDIO_H + +#include <linux/device.h> + +/* +* exported bus type +*/ +extern struct bus_type snd_hda_bus_type; + +/* +* HD-audio codec base device +*/ +struct hdac_device { +struct device dev; +int type; +}; + +/* device/driver type used for matching */ +enum { +HDA_DEV_CORE , +HDA_DEV_LEGACY , +}; + +#define dev_to_hdac_dev (_dev) container_of(_dev, struct hdac_device, dev) + +/* +* HD-audio codec base driver +*/ +struct hdac_driver { +struct device_driver driver; +int type; +int (*match)(struct hdac_device *dev,struct hdac_driver *drv); +}; + +#define drv_to_hdac_driver (_drv) container_of(_drv, struct hdac_driver, driver) + +#endif /* __SOUND_HDAUDIO_H */
sound/Kconfig +2 -0
@@ -76,6 +76,8 @@ source "sound/isa/Kconfig" source "sound/pci/Kconfig" +source "sound/hda/Kconfig" + source "sound/ppc/Kconfig" source "sound/aoa/Kconfig"
sound/Makefile +1 -1
@@ -6,7 +6,7 @@ obj-$(CONFIG_SOUND_PRIME) += sound_firmware.o obj-$(CONFIG_SOUND_PRIME) += oss/ obj-$(CONFIG_DMASOUND) += oss/ obj-$(CONFIG_SND) += core/ i2c/ drivers/ isa/ pci/ ppc/ arm/ sh/ synth/ usb/ \ - firewire/ sparc/ spi/ parisc/ pcmcia/ mips/ soc/ atmel/ + firewire/ sparc/ spi/ parisc/ pcmcia/ mips/ soc/ atmel/ hda/ obj-$(CONFIG_SND_AOA) += aoa/ # This one must be compilable even if sound is configured out
sound/hda/Kconfig new file +2 -0
@@ -0,0 +1,2 @@ +config SND_HDA_CORE + tristate
sound/hda/Makefile new file +3 -0
@@ -0,0 +1,3 @@ +snd-hda-core-objs := hda_bus_type.o + +obj-$(CONFIG_SND_HDA_CORE) += snd-hda-core.o
sound/hda/hda_bus_type.c new file +42 -0
42 lines not on this page · raw message
sound/pci/hda/Kconfig +1 -0
@@ -5,6 +5,7 @@ config SND_HDA select SND_PCM select SND_VMASTER select SND_KCTL_JACK + select SND_HDA_CORE config SND_HDA_INTEL tristate "HD Audio PCI"
sound/pci/hda/hda_bind.c +14 -33
69 lines not on this page · raw message
sound/pci/hda/hda_codec.c +1 -0
@@ -1294,6 +1294,7 @@ int snd_hda_codec_new(struct hda_bus *bus, struct snd_card *card,dev_set_name (dev,"hdaudioC%dD%d" , card->number, codec_addr);dev_set_drvdata (dev, codec);/* for sysfs */ device_enable_async_suspend (dev); + codec->core.type =HDA_DEV_LEGACY ; codec->bus = bus; codec->card = card;
sound/pci/hda/hda_codec.h +5 -6
@@ -26,6 +26,7 @@#include <sound/control.h> #include <sound/pcm.h> #include <sound/hwdep.h> +#include <sound/hdaudio.h> #include <sound/hda_verbs.h> /*
@@ -172,7 +173,7 @@ struct hda_codec_preset {#define HDA_CODEC_ID_GENERIC 0x00000201struct hda_codec_driver { -struct device_driver driver; +struct hdac_driver core;const struct hda_codec_preset *preset; };
@@ -276,7 +277,7 @@ struct hda_pcm {/* codec information */ struct hda_codec { -struct device dev; +struct hdac_device core;struct hda_bus *bus;struct snd_card *card;unsigned int addr;/* codec addr*/
@@ -409,10 +410,8 @@ struct hda_codec {struct snd_array verbs; }; -#define dev_to_hda_codec (_dev) container_of(_dev, struct hda_codec, dev) -#define hda_codec_dev (_dev) (&(_dev)->dev) - -extern struct bus_type snd_hda_bus_type; +#define dev_to_hda_codec (_dev) container_of(_dev, struct hda_codec, core.dev) +#define hda_codec_dev (_dev) (&(_dev)->core.dev)/* direction */ enum {
Signature · 1 line
2.3.3
PATCH 2/7 ALSA: hda - Move some codes up to hdac_bus struct
In reply to Takashi IwaiA few basic codes for communicating over HD-audio bus are moved to struct hdac_bus now. It has only command and get_response ops in addition to the unsolicited event handling.
Note that the codec-side tracing support is disabled temporarily during this transition due to the code shuffling. It will be re-enabled later once when all pieces are settled down.
--- include/sound/hdaudio.h | 61 +++++++++++++ sound/hda/Makefile | 2 +- sound/hda/hdac_bus.c | 181 ++++++++++++++++++++++++++++++++++++++ sound/pci/hda/hda_bind.c | 10 +++ sound/pci/hda/hda_codec.c | 191 ++++++++++++++--------------------------- sound/pci/hda/hda_codec.h | 34 +++----- sound/pci/hda/hda_controller.c | 8 +- sound/pci/hda/hda_intel.c | 4 +- sound/pci/hda/hda_sysfs.c | 2 +- sound/pci/hda/patch_conexant.c | 4 +- 10 files changed, 335 insertions(+), 162 deletions(-) create mode 100644 sound/hda/hdac_bus.c
include/sound/hdaudio.h +61 -0
@@ -6,6 +6,11 @@#define __SOUND_HDAUDIO_H#include <linux/device.h> +#include <sound/hda_verbs.h> + +struct hdac_bus ; +struct hdac_device ; +struct hdac_driver ;/* * exported bus type
@@ -18,6 +23,9 @@ extern struct bus_type snd_hda_bus_type;struct hdac_device {struct device dev;int type; +struct hdac_bus *bus; +unsigned int addr;/* codec address */ +struct list_head list;/* list point for bus codec_list */ };/* device/driver type used for matching */
@@ -35,8 +43,61 @@ struct hdac_driver {struct device_driver driver;int type;int (*match)(struct hdac_device *dev,struct hdac_driver *drv); +void (*unsol_event)(struct hdac_device *dev,unsigned int event); };#define drv_to_hdac_driver (_drv) container_of(_drv, struct hdac_driver, driver) +/* +* HD-audio bus base driver +*/ +struct hdac_bus_ops { +/* send a single command */ +int (*command)(struct hdac_bus *bus,unsigned int cmd); +/* get a response from the last command */ +int (*get_response)(struct hdac_bus *bus,unsigned int addr, +unsigned int *res); +}; + +#define HDA_UNSOL_QUEUE_SIZE 64 + +struct hdac_bus { +struct device *dev; +const struct hdac_bus_ops *ops; + +/* codec linked list */ +struct list_head codec_list; +unsigned int num_codecs; + +/* link caddr -> codec */ +struct hdac_device *caddr_tbl[HDA_MAX_CODEC_ADDRESS +1 ]; + +/* unsolicited event queue */ +u32 unsol_queue[HDA_UNSOL_QUEUE_SIZE *2 ];/* ring buffer */ +unsigned int unsol_rp, unsol_wp; +struct work_struct unsol_work; + +/* bit flags of powered codecs */ +unsigned long codec_powered; + +/* flags */ +bool sync_write:1 ;/* sync after verb write */ + +/* locks */ +struct mutex cmd_mutex; +}; + +int snd_hdac_bus_init (struct hdac_bus *bus,struct device *dev, +const struct hdac_bus_ops *ops); +void snd_hdac_bus_exit (struct hdac_bus *bus); +int snd_hdac_bus_exec_verb (struct hdac_bus *bus,unsigned int addr, +unsigned int cmd,unsigned int *res); +int snd_hdac_bus_exec_verb_unlocked (struct hdac_bus *bus,unsigned int addr, +unsigned int cmd,unsigned int *res); +void snd_hdac_bus_queue_event (struct hdac_bus *bus,u32 res,u32 res_ex); + +int snd_hdac_bus_add_device (struct hdac_bus *bus,struct hdac_device *codec); +void snd_hdac_bus_remove_device (struct hdac_bus *bus, +struct hdac_device *codec); +#endif /* __SOUND_HDAUDIO_H */
sound/hda/Makefile +1 -1
@@ -1,3 +1,3 @@ -snd-hda-core-objs := hda_bus_type.o +snd-hda-core-objs := hda_bus_type.o hdac_bus.o obj-$(CONFIG_SND_HDA_CORE) += snd-hda-core.o
sound/hda/hdac_bus.c new file +181 -0
181 lines not on this page · raw message
sound/pci/hda/hda_bind.c +10 -0
@@ -74,6 +74,15 @@ static int hda_codec_match(struct hdac_device *dev, struct hdac_driver *drv)return 0 ; } +/* process an unsolicited event */ +static void hda_codec_unsol_event (struct hdac_device *dev,unsigned int ev) +{ + struct hda_codec *codec = container_of(dev, struct hda_codec, core); + +if (codec->patch_ops.unsol_event) + codec->patch_ops.unsol_event (codec, ev); +} +/* reset the codec name from the preset */ static int codec_refresh_name (struct hda_codec *codec,const char *name) {
@@ -163,6 +172,7 @@ int __hda_codec_driver_register(struct hda_codec_driver *drv, const char *name, drv->core.driver.pm = &hda_codec_driver_pm; drv->core.type =HDA_DEV_LEGACY ; drv->core.match = hda_codec_match; + drv->core.unsol_event = hda_codec_unsol_event;return driver_register (&drv->core.driver); }EXPORT_SYMBOL_GPL (__hda_codec_driver_register);
sound/pci/hda/hda_codec.c +63 -128
394 lines not on this page · raw message
sound/pci/hda/hda_codec.h +10 -24
@@ -98,16 +98,6 @@ struct hda_bus_ops {#endif }; -/* unsolicited event handler */ -#define HDA_UNSOL_QUEUE_SIZE 64 -struct hda_bus_unsolicited { -/* ring buffer */ -u32 queue[HDA_UNSOL_QUEUE_SIZE *2 ]; -unsigned int rp, wp; -/* workqueue */ -struct work_struct work; -}; -/* * codec bus *
@@ -115,6 +105,8 @@ struct hda_bus_unsolicited {* A hda_bus contains several codecs in the list codec_list. */ struct hda_bus { +struct hdac_bus core; +struct snd_card *card;void *private_data;
@@ -122,25 +114,14 @@ struct hda_bus {const char *modelname;struct hda_bus_ops ops; -/* codec linked list */ -struct list_head codec_list; -unsigned int num_codecs; -/* link caddr -> codec */ -struct hda_codec *caddr_tbl[HDA_MAX_CODEC_ADDRESS +1 ]; - -struct mutex cmd_mutex;struct mutex prepare_mutex; -/* unsolicited event queue */ -struct hda_bus_unsolicited unsol; -/* assigned PCMs */ DECLARE_BITMAP (pcm_dev_bits,SNDRV_PCM_DEVICES );/* misc op flags */ unsigned int needs_damn_long_delay :1; unsigned int allow_bus_reset:1; /* allow bus reset at fatal error */ - unsigned int sync_write:1; /* sync after verb write *//* status for codec/controller */ unsigned int shutdown :1; /* being unloaded */ unsigned int rirb_error:1; /* error in codec communication */
@@ -149,7 +130,6 @@ struct hda_bus { unsigned int no_response_fallback:1; /* don't fallback at RIRB error */int primary_dig_out_type;/* primary digital out PCM type */ -unsigned long codec_powered;/* bit flags of powered codecs */ };/*
@@ -281,7 +261,6 @@ struct hda_codec {struct hda_bus *bus;struct snd_card *card;unsigned int addr;/* codec addr*/ -struct list_head list;/* list point */ hda_nid_t afg;/* AFG node id */ hda_nid_t mfg;/* MFG node id */
@@ -413,6 +392,9 @@ struct hda_codec {#define dev_to_hda_codec (_dev) container_of(_dev, struct hda_codec, core.dev)#define hda_codec_dev (_dev) (&(_dev)->core.dev) +#define list_for_each_codec (c, bus) \ + list_for_each_entry(c, &(bus)->core.codec_list, core.list) +/* direction */ enum {HDA_INPUT ,HDA_OUTPUT
@@ -473,7 +455,11 @@ void snd_hda_sequence_write(struct hda_codec *codec, const struct hda_verb *seq);/* unsolicited event */ -int snd_hda_queue_unsol_event (struct hda_bus *bus,u32 res,u32 res_ex); +static inline void +snd_hda_queue_unsol_event (struct hda_bus *bus,u32 res,u32 res_ex) +{ +snd_hdac_bus_queue_event (&bus->core, res, res_ex); +}/* cached write */ int snd_hda_codec_write_cache(struct hda_codec *codec, hda_nid_t nid,
sound/pci/hda/hda_controller.c +4 -4
@@ -1764,12 +1764,12 @@ static int probe_codec(struct azx *chip, int addr) (AC_VERB_PARAMETERS <<8 ) |AC_PAR_VENDOR_ID ;unsigned int res; -mutex_lock (&chip->bus->cmd_mutex); +mutex_lock (&chip->bus->core.cmd_mutex); chip->probing =1 ;azx_send_cmd (chip->bus, cmd); res =azx_get_response (chip->bus, addr); chip->probing =0 ; -mutex_unlock (&chip->bus->cmd_mutex); +mutex_unlock (&chip->bus->core.cmd_mutex);if (res ==-1 )return -EIO ;dev_dbg (chip->card->dev,"codec #%d probed OK\n" , addr);
@@ -1848,7 +1848,7 @@ int azx_bus_create(struct azx *chip, const char *model)*/ if (chip->driver_caps &AZX_DCAPS_SYNC_WRITE ) {dev_dbg (chip->card->dev,"Enable sync_write for stable communication\n" ); - bus->sync_write =1 ; + bus->core.sync_write =1 ; bus->allow_bus_reset =1 ; }
@@ -1913,7 +1913,7 @@ EXPORT_SYMBOL_GPL(azx_probe_codecs);int azx_codec_configure (struct azx *chip) {struct hda_codec *codec; -list_for_each_entry (codec, &chip->bus->codec_list, list) { +list_for_each_codec (codec, chip->bus) {snd_hda_codec_configure (codec); }return 0 ;
sound/pci/hda/hda_intel.c +2 -2
@@ -891,7 +891,7 @@ static int azx_runtime_resume(struct device *dev) bus = chip->bus;if (status && bus) { -list_for_each_entry (codec, &bus->codec_list, list) +list_for_each_codec (codec, bus)if (status & (1 << codec->addr))schedule_delayed_work (&codec->jackpoll_work, codec->jackpoll_interval);
@@ -919,7 +919,7 @@ static int azx_runtime_idle(struct device *dev)return 0 ;if (!power_save_controller || !azx_has_pm_runtime (chip) || - chip->bus->codec_powered) + chip->bus->core.codec_powered)return -EBUSY ;return 0 ;
sound/pci/hda/hda_sysfs.c +1 -1
@@ -552,7 +552,7 @@ static void parse_codec_mode(char *buf, struct hda_bus *bus, *codecp =NULL ;if (sscanf (buf,"%i %i %i" , &vendorid, &subid, &caddr) ==3 ) { -list_for_each_entry (codec, &bus->codec_list, list) { +list_for_each_codec (codec, bus) {if ((vendorid <=0 || codec->vendor_id == vendorid) && (subid <=0 || codec->subsystem_id == subid) && codec->addr == caddr) {
sound/pci/hda/patch_conexant.c +2 -2
@@ -919,10 +919,10 @@ static int patch_conexant_auto(struct hda_codec *codec)* which falls into the single-cmd mode. * Better to make reset, then. */ -if (!codec->bus->sync_write) { +if (!codec->bus->core.sync_write) {codec_info (codec,"Enable sync_write for stable communication\n" ); - codec->bus->sync_write =1 ; + codec->bus->core.sync_write =1 ; codec->bus->allow_bus_reset =1 ; }
Signature · 1 line
2.3.3
PATCH 3/7 ALSA: hda - Move a part of hda_codec stuff into hdac_device
In reply to Takashi IwaiNow some codes and functionalities of hda_codec struct are moved to hdac_device struct. A few basic attributes like the codec address, vendor ID number, FG numbers, etc are moved to hdac_device, and they are accessed like codec->core.addr. The basic verb exec functions are moved, too.
--- include/sound/hdaudio.h | 66 ++++++ sound/hda/Makefile | 2 +- sound/hda/hdac_device.c | 471 ++++++++++++++++++++++++++++++++++++++++ sound/hda/local.h | 19 ++ sound/pci/hda/hda_auto_parser.c | 33 ++- sound/pci/hda/hda_beep.c | 4 +- sound/pci/hda/hda_bind.c | 95 ++------ sound/pci/hda/hda_codec.c | 396 +++++---------------------------- sound/pci/hda/hda_codec.h | 43 +--- sound/pci/hda/hda_generic.c | 25 +-- sound/pci/hda/hda_local.h | 15 +- sound/pci/hda/hda_proc.c | 42 ++-- sound/pci/hda/hda_sysfs.c | 58 ++--- sound/pci/hda/local.h | 39 ++++ sound/pci/hda/patch_analog.c | 2 +- sound/pci/hda/patch_ca0132.c | 6 +- sound/pci/hda/patch_conexant.c | 16 +- sound/pci/hda/patch_hdmi.c | 20 +- sound/pci/hda/patch_realtek.c | 78 +++---- sound/pci/hda/patch_si3054.c | 6 +- sound/pci/hda/patch_sigmatel.c | 84 +++---- sound/pci/hda/patch_via.c | 23 +- sound/pci/hda/thinkpad_helper.c | 2 +- 23 files changed, 880 insertions(+), 665 deletions(-) create mode 100644 sound/hda/hdac_device.c create mode 100644 sound/hda/local.h create mode 100644 sound/pci/hda/local.h
include/sound/hdaudio.h +66 -0
@@ -8,6 +8,9 @@#include <linux/device.h> #include <sound/hda_verbs.h> +/* codec node id */ +typedef u16 hda_nid_t ; +struct hdac_bus ;struct hdac_device ;struct hdac_driver ;
@@ -26,6 +29,30 @@ struct hdac_device {struct hdac_bus *bus;unsigned int addr;/* codec address */ struct list_head list;/* list point for bus codec_list */ + +hda_nid_t afg;/* AFG node id */ +hda_nid_t mfg;/* MFG node id */ + +/* ids */ +unsigned int vendor_id; +unsigned int subsystem_id; +unsigned int revision_id; +unsigned int afg_function_id; +unsigned int mfg_function_id; + unsigned int afg_unsol:1; + unsigned int mfg_unsol:1; + +unsigned int power_caps;/* FG power caps */ + +const char *vendor_name;/* codec vendor name */ +const char *chip_name;/* codec chip name */ + +/* widgets */ +unsigned int num_nodes; +hda_nid_t start_nid, end_nid; + +/* misc flags */ +atomic_t in_pm;/* suspend/resume being performed */ };/* device/driver type used for matching */
@@ -34,8 +61,37 @@ enum { HDA_DEV_LEGACY, }; +/* direction */ +enum { +HDA_INPUT ,HDA_OUTPUT +}; +#define dev_to_hdac_dev (_dev) container_of(_dev, struct hdac_device, dev) +int snd_hdac_device_init (struct hdac_device *dev,struct hdac_bus *bus, +const char *name,unsigned int addr); +void snd_hdac_device_exit (struct hdac_device *dev); + +int snd_hdac_refresh_widgets (struct hdac_device *codec); + +unsigned int snd_hdac_make_cmd (struct hdac_device *codec,hda_nid_t nid, +unsigned int verb,unsigned int parm); +int snd_hdac_read (struct hdac_device *codec,hda_nid_t nid, +unsigned int verb,unsigned int parm,unsigned int *res); +int snd_hdac_read_parm (struct hdac_device *codec,hda_nid_t nid,int parm); +int snd_hdac_get_connections (struct hdac_device *codec,hda_nid_t nid, +hda_nid_t *conn_list,int max_conns); +int snd_hdac_get_sub_nodes (struct hdac_device *codec,hda_nid_t nid, +hda_nid_t *start_id); + +#ifdef CONFIG_PM +void snd_hdac_power_up (struct hdac_device *codec); +void snd_hdac_power_down (struct hdac_device *codec); +#else +static inline void snd_hdac_power_up (struct hdac_device *codec) {} +static inline void snd_hdac_power_down (struct hdac_device *codec) {} +#endif +/* * HD-audio codec base driver */
@@ -100,4 +156,14 @@ int snd_hdac_bus_add_device(struct hdac_bus *bus, struct hdac_device *codec);void snd_hdac_bus_remove_device (struct hdac_bus *bus,struct hdac_device *codec); +static inline void snd_hdac_codec_link_up (struct hdac_device *codec) +{ +set_bit (codec->addr, &codec->bus->codec_powered); +} + +static inline void snd_hdac_codec_link_down (struct hdac_device *codec) +{ +clear_bit (codec->addr, &codec->bus->codec_powered); +} +#endif /* __SOUND_HDAUDIO_H */
sound/hda/Makefile +1 -1
@@ -1,3 +1,3 @@ -snd-hda-core-objs := hda_bus_type.o hdac_bus.o +snd-hda-core-objs := hda_bus_type.o hdac_bus.o hdac_device.o obj-$(CONFIG_SND_HDA_CORE) += snd-hda-core.o
sound/hda/hdac_device.c new file +471 -0
471 lines not on this page · raw message
sound/hda/local.h new file +19 -0
@@ -0,0 +1,19 @@ +/* +* Local helper macros and functions for HD-audio core drivers +*/ + +#ifndef __HDAC_LOCAL_H +#define __HDAC_LOCAL_H + +#define get_wcaps (codec, nid) \ + snd_hdac_read_parm(codec, nid, AC_PAR_AUDIO_WIDGET_CAP) + +/* get the widget type from widget capability bits */ +static inline int get_wcaps_type (unsigned int wcaps) +{ +if (!wcaps) +return -1 ;/* invalid type */ +return (wcaps &AC_WCAP_TYPE ) >>AC_WCAP_TYPE_SHIFT ; +} + +#endif /* __HDAC_LOCAL_H */
sound/pci/hda/hda_auto_parser.c +16 -17
@@ -172,7 +172,7 @@ int snd_hda_parse_pin_defcfg(struct hda_codec *codec,const hda_nid_t *ignore_nids, unsigned int cond_flags) { - hda_nid_t nid, end_nid; + hda_nid_t nid;short seq, assoc_line_out;struct auto_out_pin line_out[ARRAY_SIZE (cfg->line_out_pins)];struct auto_out_pin speaker_out[ARRAY_SIZE (cfg->speaker_pins)];
@@ -189,8 +189,7 @@ int snd_hda_parse_pin_defcfg(struct hda_codec *codec,memset (hp_out,0 ,sizeof (hp_out)); assoc_line_out =0 ; - end_nid = codec->start_nid + codec->num_nodes; -for (nid = codec->start_nid; nid < end_nid; nid++) { +for_each_hda_codec_node (nid, codec) {unsigned int wid_caps =get_wcaps (codec, nid);unsigned int wid_type =get_wcaps_type (wid_caps);unsigned int def_conf;
@@ -410,7 +409,7 @@ int snd_hda_parse_pin_defcfg(struct hda_codec *codec,* debug prints of the parsed results */ codec_info(codec, "autoconfig for %s: line_outs=%d (0x%x/0x%x/0x%x/0x%x/0x%x) type:%s\n", - codec->chip_name, cfg->line_outs, cfg->line_out_pins[0], + codec->core.chip_name, cfg->line_outs, cfg->line_out_pins[0], cfg->line_out_pins[1], cfg->line_out_pins[2], cfg->line_out_pins[3], cfg->line_out_pins[4], cfg->line_out_type == AUTO_PIN_HP_OUT ? "hp" :
@@ -836,33 +835,33 @@ static void apply_fixup(struct hda_codec *codec, int id, int action, int depth)if (action !=HDA_FIXUP_ACT_PRE_PROBE || !fix->v.pins)break ;codec_dbg (codec,"%s: Apply pincfg for %s\n" , - codec->chip_name, modelname); + codec->core.chip_name, modelname);snd_hda_apply_pincfgs (codec, fix->v.pins);break ;case HDA_FIXUP_VERBS :if (action !=HDA_FIXUP_ACT_PROBE || !fix->v.verbs)break ;codec_dbg (codec,"%s: Apply fix-verbs for %s\n" , - codec->chip_name, modelname); + codec->core.chip_name, modelname);snd_hda_add_verbs (codec, fix->v.verbs);break ;case HDA_FIXUP_FUNC :if (!fix->v.func)break ;codec_dbg (codec,"%s: Apply fix-func for %s\n" , - codec->chip_name, modelname); + codec->core.chip_name, modelname); fix->v.func (codec, fix, action);break ;case HDA_FIXUP_PINCTLS :if (action !=HDA_FIXUP_ACT_PROBE || !fix->v.pins)break ;codec_dbg (codec,"%s: Apply pinctl for %s\n" , - codec->chip_name, modelname); + codec->core.chip_name, modelname);set_pin_targets (codec, fix->v.pins);break ;default :codec_err (codec,"%s: Invalid fixup type %d\n" , - codec->chip_name, fix->type); + codec->core.chip_name, fix->type);break ; }if (!fix->chained || fix->chained_before)
@@ -912,16 +911,16 @@ void snd_hda_pick_pin_fixup(struct hda_codec *codec,return ;for (pq = pin_quirk; pq->subvendor; pq++) { -if ((codec->subsystem_id &0xffff0000 ) != (pq->subvendor <<16 )) +if ((codec->core.subsystem_id &0xffff0000 ) != (pq->subvendor <<16 ))continue ; -if (codec->vendor_id != pq->codec) +if (codec->core.vendor_id != pq->codec)continue ;if (pin_config_match (codec, pq->pins)) { codec->fixup_id = pq->value;#ifdef CONFIG_SND_DEBUG_VERBOSE codec->fixup_name = pq->name;codec_dbg (codec,"%s: picked fixup %s (pin match)\n" , - codec->chip_name, codec->fixup_name); + codec->core.chip_name, codec->fixup_name);#endif codec->fixup_list = fixlist;return ;
@@ -963,7 +962,7 @@ void snd_hda_pick_fixup(struct hda_codec *codec, codec->fixup_name =NULL ; codec->fixup_id =HDA_FIXUP_ID_NO_FIXUP ;codec_dbg (codec,"%s: picked no fixup (nofixup specified)\n" , - codec->chip_name); + codec->core.chip_name);return ; }
@@ -974,7 +973,7 @@ void snd_hda_pick_fixup(struct hda_codec *codec, codec->fixup_name = models->name; codec->fixup_list = fixlist;codec_dbg (codec,"%s: picked fixup %s (model specified)\n" , - codec->chip_name, codec->fixup_name); + codec->core.chip_name, codec->fixup_name);return ; } models++;
@@ -987,7 +986,7 @@ void snd_hda_pick_fixup(struct hda_codec *codec,#ifdef CONFIG_SND_DEBUG_VERBOSE name = q->name;codec_dbg (codec,"%s: picked fixup %s (PCI SSID%s)\n" , - codec->chip_name, name, q->subdevice_mask ?"" :" - vendor generic" ); + codec->core.chip_name, name, q->subdevice_mask ?"" :" - vendor generic" );#endif } }
@@ -996,12 +995,12 @@ void snd_hda_pick_fixup(struct hda_codec *codec,unsigned int vendorid = q->subdevice | (q->subvendor <<16 );unsigned int mask =0xffff0000 | q->subdevice_mask; -if ((codec->subsystem_id & mask) == (vendorid & mask)) { +if ((codec->core.subsystem_id & mask) == (vendorid & mask)) { id = q->value;#ifdef CONFIG_SND_DEBUG_VERBOSE name = q->name;codec_dbg (codec,"%s: picked fixup %s (codec SSID)\n" , - codec->chip_name, name); + codec->core.chip_name, name);#endif break ; }
sound/pci/hda/hda_beep.c +2 -2
@@ -165,8 +165,8 @@ static int snd_hda_do_attach(struct hda_beep *beep) input_dev->id.bustype =BUS_PCI ; input_dev->dev.parent = &codec->card->card_dev; - input_dev->id.vendor = codec->vendor_id >>16 ; - input_dev->id.product = codec->vendor_id &0xffff ; + input_dev->id.vendor = codec->core.vendor_id >>16 ; + input_dev->id.product = codec->core.vendor_id &0xffff ; input_dev->id.version =0x01 ; input_dev->evbit[0 ] =BIT_MASK (EV_SND );
sound/pci/hda/hda_bind.c +15 -80
155 lines not on this page · raw message
sound/pci/hda/hda_codec.c +51 -345
632 lines not on this page · raw message
sound/pci/hda/hda_codec.h +10 -33
98 lines not on this page · raw message
sound/pci/hda/hda_generic.c +11 -14
@@ -654,7 +654,7 @@ static bool is_active_nid(struct hda_codec *codec, hda_nid_t nid,int type =get_wcaps_type (get_wcaps (codec, nid));int i, n; -if (nid == codec->afg) +if (nid == codec->core.afg)return true;for (n =0 ; n < spec->paths.used; n++) {
@@ -832,7 +832,7 @@ static hda_nid_t path_power_update(struct hda_codec *codec,for (i =0 ; i < path->depth; i++) { nid = path->path[i]; -if (nid == codec->afg) +if (nid == codec->core.afg)continue ;if (!allow_powerdown ||is_active_nid_for_any (codec, nid)) state =AC_PWRST_D0 ;
@@ -1897,12 +1897,11 @@ static void debug_show_configs(struct hda_codec *codec,static void fill_all_dac_nids (struct hda_codec *codec) {struct hda_gen_spec *spec = codec->spec; -int i; -hda_nid_t nid = codec->start_nid; +hda_nid_t nid; spec->num_all_dacs =0 ;memset (spec->all_dacs,0 ,sizeof (spec->all_dacs)); -for (i =0 ; i < codec->num_nodes; i++, nid++) { +for_each_hda_codec_node (nid, codec) {if (get_wcaps_type (get_wcaps (codec, nid)) !=AC_WID_AUD_OUT )continue ;if (spec->num_all_dacs >=ARRAY_SIZE (spec->all_dacs)) {
@@ -3067,10 +3066,9 @@ static int fill_adc_nids(struct hda_codec *codec)hda_nid_t nid;hda_nid_t *adc_nids = spec->adc_nids;int max_nums =ARRAY_SIZE (spec->adc_nids); -int i, nums =0 ; +int nums =0 ; - nid = codec->start_nid; -for (i =0 ; i < codec->num_nodes; i++, nid++) { +for_each_hda_codec_node (nid, codec) {unsigned int caps =get_wcaps (codec, nid);int type =get_wcaps_type (caps);
@@ -3864,8 +3862,7 @@ static void parse_digital(struct hda_codec *codec)if (spec->autocfg.dig_in_pin) { pin = spec->autocfg.dig_in_pin; - dig_nid = codec->start_nid; -for (i =0 ; i < codec->num_nodes; i++, dig_nid++) { +for_each_hda_codec_node (dig_nid, codec) {unsigned int wcaps =get_wcaps (codec, dig_nid);if (get_wcaps_type (wcaps) !=AC_WID_AUD_IN )continue ;
@@ -4683,7 +4680,7 @@ unsigned int snd_hda_gen_path_power_filter(struct hda_codec *codec, hda_nid_t nid, unsigned int power_state) { -if (power_state !=AC_PWRST_D0 || nid == codec->afg) +if (power_state !=AC_PWRST_D0 || nid == codec->core.afg)return power_state;if (get_wcaps_type (get_wcaps (codec, nid)) >=AC_WID_POWER )return power_state;
@@ -5455,7 +5452,7 @@ int snd_hda_gen_build_pcms(struct hda_codec *codec)fill_pcm_stream_name (spec->stream_name_analog,sizeof (spec->stream_name_analog), -" Analog" , codec->chip_name); +" Analog" , codec->core.chip_name); info =snd_hda_codec_pcm_new (codec,"%s" , spec->stream_name_analog);if (!info)return -ENOMEM ;
@@ -5486,7 +5483,7 @@ int snd_hda_gen_build_pcms(struct hda_codec *codec)if (spec->multiout.dig_out_nid || spec->dig_in_nid) {fill_pcm_stream_name (spec->stream_name_digital,sizeof (spec->stream_name_digital), -" Digital" , codec->chip_name); +" Digital" , codec->core.chip_name); info =snd_hda_codec_pcm_new (codec,"%s" , spec->stream_name_digital);if (!info)
@@ -5521,7 +5518,7 @@ int snd_hda_gen_build_pcms(struct hda_codec *codec)if (spec->alt_dac_nid || have_multi_adcs) {fill_pcm_stream_name (spec->stream_name_alt_analog,sizeof (spec->stream_name_alt_analog), -" Alt Analog" , codec->chip_name); +" Alt Analog" , codec->core.chip_name); info =snd_hda_codec_pcm_new (codec,"%s" , spec->stream_name_alt_analog);if (!info)
sound/pci/hda/hda_local.h +9 -6
@@ -515,15 +515,18 @@ int snd_hda_codec_get_pin_target(struct hda_codec *codec, hda_nid_t nid);int snd_hda_codec_set_pin_target (struct hda_codec *codec,hda_nid_t nid,unsigned int val); +#define for_each_hda_codec_node (nid, codec) \ + for ((nid) = (codec)->core.start_nid; (nid) < (codec)->core.end_nid; (nid)++) +/* * get widget capabilities */ static inline u32 get_wcaps (struct hda_codec *codec,hda_nid_t nid) { -if (nid < codec->start_nid || - nid >= codec->start_nid + codec->num_nodes) +if (nid < codec->core.start_nid || + nid >= codec->core.start_nid + codec->core.num_nodes)return 0 ; -return codec->wcaps[nid - codec->start_nid]; +return codec->wcaps[nid - codec->core.start_nid]; }/* get the widget type from widget capability bits */
@@ -547,9 +550,9 @@ static inline unsigned int get_wcaps_channels(u32 wcaps)static inline void snd_hda_override_wcaps (struct hda_codec *codec,hda_nid_t nid,u32 val) { -if (nid >= codec->start_nid && - nid < codec->start_nid + codec->num_nodes) - codec->wcaps[nid - codec->start_nid] = val; +if (nid >= codec->core.start_nid && + nid < codec->core.start_nid + codec->core.num_nodes) + codec->wcaps[nid - codec->core.start_nid] = val; }u32 query_amp_caps (struct hda_codec *codec,hda_nid_t nid,int direction);
sound/pci/hda/hda_proc.c +24 -18
87 lines not on this page · raw message
sound/pci/hda/hda_sysfs.c +29 -29
121 lines not on this page · raw message
sound/pci/hda/local.h new file +39 -0
@@ -0,0 +1,39 @@ +/* +*/ + +#ifndef __HDAC_LOCAL_H +#define __HDAC_LOCAL_H + +int hdac_read_parm (struct hdac_device *codec,hda_nid_t nid,int parm); + +#define get_wcaps (codec, nid) \ + hdac_read_parm(codec, nid, AC_PAR_AUDIO_WIDGET_CAP) +/* get the widget type from widget capability bits */ +static inline int get_wcaps_type (unsigned int wcaps) +{ +if (!wcaps) +return -1 ;/* invalid type */ +return (wcaps &AC_WCAP_TYPE ) >>AC_WCAP_TYPE_SHIFT ; +} + +#define get_pin_caps (codec, nid) \ + hdac_read_parm(codec, nid, AC_PAR_PIN_CAP) + +static inline +unsigned int get_pin_cfg (struct hdac_device *codec,hda_nid_t nid) +{ +unsigned int val; + +if (snd_hdac_read (codec, nid,AC_VERB_GET_CONFIG_DEFAULT ,0 , &val)) +return -1 ; +return val; +} + +#define get_amp_caps (codec, nid, dir) \ + hdac_read_parm(codec, nid, (dir) == HDA_OUTPUT ? \ + AC_PAR_AMP_OUT_CAP : AC_PAR_AMP_IN_CAP) + +#define get_power_caps (codec, nid) \ + hdac_read_parm(codec, nid, AC_PAR_POWER_STATE) + +#endif /* __HDAC_LOCAL_H */
sound/pci/hda/patch_analog.c +1 -1
@@ -99,7 +99,7 @@ static void ad198x_power_eapd_write(struct hda_codec *codec, hda_nid_t front,static void ad198x_power_eapd (struct hda_codec *codec) {/* We currently only handle front, HP */ -switch (codec->vendor_id) { +switch (codec->core.vendor_id) {case 0x11d41882 :case 0x11d4882a :case 0x11d41884 :
sound/pci/hda/patch_ca0132.c +1 -5
@@ -4243,13 +4243,9 @@ static void ca0132_refresh_widget_caps(struct hda_codec *codec) {struct ca0132_spec *spec = codec->spec;int i; -hda_nid_t nid;codec_dbg (codec,"ca0132_refresh_widget_caps.\n" ); - nid = codec->start_nid; -for (i =0 ; i < codec->num_nodes; i++, nid++) - codec->wcaps[i] =snd_hda_param_read (codec, nid, -AC_PAR_AUDIO_WIDGET_CAP ); +snd_hda_codec_update_widgets (codec);for (i =0 ; i < spec->multiout.num_dacs; i++)refresh_amp_caps (codec, spec->dacs[i],HDA_OUTPUT );
sound/pci/hda/patch_conexant.c +7 -9
@@ -103,10 +103,9 @@ static int add_beep_ctls(struct hda_codec *codec)static void cx_auto_parse_beep (struct hda_codec *codec) {struct conexant_spec *spec = codec->spec; -hda_nid_t nid, end_nid; +hda_nid_t nid; - end_nid = codec->start_nid + codec->num_nodes; -for (nid = codec->start_nid; nid < end_nid; nid++) +for_each_hda_codec_node (nid, codec)if (get_wcaps_type (get_wcaps (codec, nid)) ==AC_WID_BEEP ) {set_beep_amp (spec, nid,0 ,HDA_OUTPUT );break ;
@@ -120,10 +119,9 @@ static void cx_auto_parse_beep(struct hda_codec *codec)static void cx_auto_parse_eapd (struct hda_codec *codec) {struct conexant_spec *spec = codec->spec; -hda_nid_t nid, end_nid; +hda_nid_t nid; - end_nid = codec->start_nid + codec->num_nodes; -for (nid = codec->start_nid; nid < end_nid; nid++) { +for_each_hda_codec_node (nid, codec) {if (get_wcaps_type (get_wcaps (codec, nid)) !=AC_WID_PIN )continue ;if (!(snd_hda_query_pin_caps (codec, nid) &AC_PINCAP_EAPD ))
@@ -848,7 +846,7 @@ static int patch_conexant_auto(struct hda_codec *codec)struct conexant_spec *spec;int err; -codec_info (codec,"%s: BIOS auto-probing.\n" , codec->chip_name); +codec_info (codec,"%s: BIOS auto-probing.\n" , codec->core.chip_name); spec =kzalloc (sizeof (*spec),GFP_KERNEL );if (!spec)
@@ -862,7 +860,7 @@ static int patch_conexant_auto(struct hda_codec *codec)if (spec->dynamic_eapd) spec->gen.vmaster_mute.hook = cx_auto_vmaster_hook; -switch (codec->vendor_id) { +switch (codec->core.vendor_id) {case 0x14f15045 : codec->single_adc_amp =1 ; spec->gen.mixer_nid =0x17 ;
@@ -896,7 +894,7 @@ static int patch_conexant_auto(struct hda_codec *codec)* others may use EAPD really as an amp switch, so it might be * not good to expose it blindly. */ -switch (codec->subsystem_id >>16 ) { +switch (codec->core.subsystem_id >>16 ) {case 0x103c : spec->gen.vmaster_mute_enum =1 ;break ;
sound/pci/hda/patch_hdmi.c +10 -10
@@ -45,14 +45,14 @@ static bool static_hdmi_pcm;module_param (static_hdmi_pcm, bool,0644 );MODULE_PARM_DESC (static_hdmi_pcm,"Don't restrict PCM parameters per ELD info" ); -#define is_haswell (codec) ((codec)->vendor_id == 0x80862807) -#define is_broadwell (codec) ((codec)->vendor_id == 0x80862808) -#define is_skylake (codec) ((codec)->vendor_id == 0x80862809) +#define is_haswell (codec) ((codec)->core.vendor_id == 0x80862807) +#define is_broadwell (codec) ((codec)->core.vendor_id == 0x80862808) +#define is_skylake (codec) ((codec)->core.vendor_id == 0x80862809)#define is_haswell_plus (codec) (is_haswell(codec) || is_broadwell(codec) \ || is_skylake(codec)) -#define is_valleyview (codec) ((codec)->vendor_id == 0x80862882) -#define is_cherryview (codec) ((codec)->vendor_id == 0x80862883) +#define is_valleyview (codec) ((codec)->core.vendor_id == 0x80862882) +#define is_cherryview (codec) ((codec)->core.vendor_id == 0x80862883)#define is_valleyview_plus (codec) (is_valleyview(codec) || is_cherryview(codec))struct hdmi_spec_per_cvt {
@@ -1391,13 +1391,12 @@ static void intel_not_share_assigned_cvt(struct hda_codec *codec, hda_nid_t pin_nid, int mux_idx) {struct hdmi_spec *spec = codec->spec; -hda_nid_t nid, end_nid; +hda_nid_t nid;int cvt_idx, curr;struct hdmi_spec_per_cvt *per_cvt;/* configure all pins, including "no physical connection" ones */ - end_nid = codec->start_nid + codec->num_nodes; -for (nid = codec->start_nid; nid < end_nid; nid++) { +for_each_hda_codec_node (nid, codec) {unsigned int wid_caps =get_wcaps (codec, nid);unsigned int wid_type =get_wcaps_type (wid_caps);
@@ -1728,7 +1727,7 @@ static int hdmi_parse_codec(struct hda_codec *codec)hda_nid_t nid;int i, nodes; - nodes =snd_hda_get_sub_nodes (codec, codec->afg, &nid); + nodes =snd_hda_get_sub_nodes (codec, codec->core.afg, &nid);if (!nid || nodes <0 ) {codec_warn (codec,"HDMI: failed to get afg sub nodes\n" );return -EINVAL ;
@@ -2928,7 +2927,8 @@ static int patch_nvhdmi(struct hda_codec *codec)*/ #define is_amdhdmi_rev3_or_later (codec) \ - ((codec)->vendor_id == 0x1002aa01 && ((codec)->revision_id & 0xff00) >= 0x0300) + ((codec)->core.vendor_id == 0x1002aa01 && \ + ((codec)->core.revision_id & 0xff00) >= 0x0300)#define has_amd_full_remap_support (codec) is_amdhdmi_rev3_or_later(codec)/* ATI/AMD specific HDA pin verbs, see the AMD HDA Verbs specification */
sound/pci/hda/patch_realtek.c +39 -39
262 lines not on this page · raw message
sound/pci/hda/patch_si3054.c +3 -3
@@ -205,8 +205,8 @@ static int si3054_build_pcms(struct hda_codec *codec)return -ENOMEM ; info->stream[SNDRV_PCM_STREAM_PLAYBACK ] = si3054_pcm; info->stream[SNDRV_PCM_STREAM_CAPTURE ] = si3054_pcm; - info->stream[SNDRV_PCM_STREAM_PLAYBACK ].nid = codec->mfg; - info->stream[SNDRV_PCM_STREAM_CAPTURE ].nid = codec->mfg; + info->stream[SNDRV_PCM_STREAM_PLAYBACK ].nid = codec->core.mfg; + info->stream[SNDRV_PCM_STREAM_CAPTURE ].nid = codec->core.mfg; info->pcm_type =HDA_PCM_TYPE_MODEM ;return 0 ; }
@@ -223,7 +223,7 @@ static int si3054_init(struct hda_codec *codec)u16 val;snd_hda_codec_write (codec,AC_NODE_ROOT ,0 ,AC_VERB_SET_CODEC_RESET ,0 ); -snd_hda_codec_write (codec, codec->mfg,0 ,AC_VERB_SET_STREAM_FORMAT ,0 ); +snd_hda_codec_write (codec, codec->core.mfg,0 ,AC_VERB_SET_STREAM_FORMAT ,0 );SET_REG (codec,SI3054_LINE_RATE ,9600 );SET_REG (codec,SI3054_LINE_LEVEL ,SI3054_DTAG_MASK |SI3054_ATAG_MASK );SET_REG (codec,SI3054_EXTENDED_MID ,0 );
sound/pci/hda/patch_sigmatel.c +44 -40
276 lines not on this page · raw message
sound/pci/hda/patch_via.c +11 -12
@@ -140,7 +140,7 @@ static struct via_spec *via_new_spec(struct hda_codec *codec)static enum VIA_HDA_CODEC get_codec_type (struct hda_codec *codec) { -u32 vendor_id = codec->vendor_id; +u32 vendor_id = codec->core.vendor_id;u16 ven_id = vendor_id >>16 ;u16 dev_id = vendor_id &0xffff ;enum VIA_HDA_CODEC codec_type;
@@ -335,7 +335,7 @@ static void __analog_low_current_mode(struct hda_codec *codec, bool force)return ;/* other codecs are not supported */ }/* send verb */ -snd_hda_codec_write (codec, codec->afg,0 , verb, parm); +snd_hda_codec_write (codec, codec->core.afg,0 , verb, parm); }static void analog_low_current_mode (struct hda_codec *codec)
@@ -558,7 +558,7 @@ static int vt1708_build_pcms(struct hda_codec *codec)int i, err; err =snd_hda_gen_build_pcms (codec); -if (err <0 || codec->vendor_id !=0x11061708 ) +if (err <0 || codec->core.vendor_id !=0x11061708 )return err;/* We got noisy outputs on the right channel on VT1708 when
@@ -714,19 +714,19 @@ static int patch_vt1708S(struct hda_codec *codec)/* correct names for VT1708BCE */ if (get_codec_type (codec) ==VT1708BCE ) { -kfree (codec->chip_name); - codec->chip_name =kstrdup ("VT1708BCE" ,GFP_KERNEL ); +kfree (codec->core.chip_name); + codec->core.chip_name =kstrdup ("VT1708BCE" ,GFP_KERNEL );snprintf (codec->card->mixername,sizeof (codec->card->mixername), -"%s %s" , codec->vendor_name, codec->chip_name); +"%s %s" , codec->core.vendor_name, codec->core.chip_name); }/* correct names for VT1705 */ -if (codec->vendor_id ==0x11064397 ) { -kfree (codec->chip_name); - codec->chip_name =kstrdup ("VT1705" ,GFP_KERNEL ); +if (codec->core.vendor_id ==0x11064397 ) { +kfree (codec->core.chip_name); + codec->core.chip_name =kstrdup ("VT1705" ,GFP_KERNEL );snprintf (codec->card->mixername,sizeof (codec->card->mixername), -"%s %s" , codec->vendor_name, codec->chip_name); +"%s %s" , codec->core.vendor_name, codec->core.chip_name); }/* automatic parse from the BIOS config */
@@ -815,8 +815,7 @@ static int add_secret_dac_path(struct hda_codec *codec) }/* find the primary DAC and add to the connection list */ - nid = codec->start_nid; -for (i =0 ; i < codec->num_nodes; i++, nid++) { +for_each_hda_codec_node (nid, codec) {unsigned int caps =get_wcaps (codec, nid);if (get_wcaps_type (caps) ==AC_WID_AUD_OUT && !(caps &AC_WCAP_DIGITAL )) {
sound/pci/hda/thinkpad_helper.c +1 -1
@@ -21,7 +21,7 @@ static acpi_status acpi_check_cb(acpi_handle handle, u32 lvl, void *context,static bool is_thinkpad (struct hda_codec *codec) {bool found = false; -if (codec->subsystem_id >>16 !=0x17aa ) +if (codec->core.subsystem_id >>16 !=0x17aa )return false;if (ACPI_SUCCESS (acpi_get_devices ("LEN0068" , acpi_check_cb, &found,NULL )) && found)return true;
Signature · 1 line
2.3.3
PATCH 4/7 ALSA: hda - Add widget sysfs tree
In reply to Takashi IwaiThis patch changes the sysfs files assigned to the codec device on the bus which were formerly identical with hwdep sysfs files. Now it shows only a few core parameter, vendor_id, subsystem_id, revision_id, afg, mfg, vendor_name and chip_name.
In addition, now a widget tree is added to the bus device sysfs directory for showing the widget topology and attributes. It's just a flat tree consisting of subdirectories named as the widget NID including various attributes like widget capability bits. The AFG (usually NID 0x01) is always found there, and it contains always amp_in_caps, amp_out_caps and power_caps files. Each of these attributes show a single value. The rest are the widget nodes belonging to that AFG. Note that the child node might not start from 0x02 but from another value like 0x0a.
Each child node may contain caps, pin_caps, amp_in_caps, amp_out_caps, power_caps and connections files. The caps (representing the widget capability bits) always contain a value. The rest may contain value(s) if the attribute exists on the node. Only connections file show multiple values while other attributes have zero or one single value.
An example of ls -R output is like below:
% ls -R /sys/bus/hdaudio/devices/hdaudioC0D0//sys/bus/hdaudio/devices/hdaudioC0D0/widgets/:
01/ 04/ 07/ 0a/ 0d/ 10/ 13/ 16/ 19/ 1c/ 1f/ 22/ 02/ 05/ 08/ 0b/ 0e/ 11/ 14/ 17/ 1a/ 1d/ 20/ 23/ 03/ 06/ 09/ 0c/ 0f/ 12/ 15/ 18/ 1b/ 1e/ 21/
/sys/bus/hdaudio/devices/hdaudioC0D0/widgets/01:amp_in_caps amp_out_caps power_caps
/sys/bus/hdaudio/devices/hdaudioC0D0/widgets/02:amp_in_caps amp_out_caps caps connections pin_caps pin_cfg power_caps
/sys/bus/hdaudio/devices/hdaudioC0D0/widgets/03:
.....
--- include/sound/hdaudio.h | 6 + sound/hda/Makefile | 2 +- sound/hda/hdac_device.c | 35 ++++ sound/hda/hdac_sysfs.c | 404 ++++++++++++++++++++++++++++++++++++++++++++++ sound/hda/local.h | 4 + sound/pci/hda/hda_bind.c | 4 +- sound/pci/hda/hda_codec.c | 6 +- 7 files changed, 454 insertions(+), 7 deletions(-) create mode 100644 sound/hda/hdac_sysfs.c
include/sound/hdaudio.h +6 -0
@@ -14,6 +14,7 @@ typedef u16 hda_nid_t;struct hdac_bus ;struct hdac_device ;struct hdac_driver ; +struct hdac_widget_tree ;/* * exported bus type
@@ -53,6 +54,9 @@ struct hdac_device {/* misc flags */ atomic_t in_pm;/* suspend/resume being performed */ + +/* sysfs */ +struct hdac_widget_tree *widgets; };/* device/driver type used for matching */
@@ -71,6 +75,8 @@ enum {int snd_hdac_device_init (struct hdac_device *dev,struct hdac_bus *bus,const char *name,unsigned int addr);void snd_hdac_device_exit (struct hdac_device *dev); +int snd_hdac_device_register (struct hdac_device *codec); +void snd_hdac_device_unregister (struct hdac_device *codec);int snd_hdac_refresh_widgets (struct hdac_device *codec);
sound/hda/Makefile +1 -1
@@ -1,3 +1,3 @@ -snd-hda-core-objs := hda_bus_type.o hdac_bus.o hdac_device.o +snd-hda-core-objs := hda_bus_type.o hdac_bus.o hdac_device.o hdac_sysfs.o obj-$(CONFIG_SND_HDA_CORE) += snd-hda-core.o
sound/hda/hdac_device.c +35 -0
@@ -45,6 +45,7 @@ int snd_hdac_device_init(struct hdac_device *codec, struct hdac_bus *bus, dev->parent = bus->dev; dev->bus = &snd_hda_bus_type; dev->release = default_release; + dev->groups = hdac_dev_attr_groups;dev_set_name (dev,"%s" , name);device_enable_async_suspend (dev);
@@ -128,6 +129,40 @@ void snd_hdac_device_exit(struct hdac_device *codec)EXPORT_SYMBOL_GPL (snd_hdac_device_exit);/** +* snd_hdac_device_register - register the hd-audio codec base device +* codec: the device to register +*/ +int snd_hdac_device_register (struct hdac_device *codec) +{ +int err; + + err =device_add (&codec->dev); +if (err <0 ) +return err; + err =hda_widget_sysfs_init (codec); +if (err <0 ) { +device_del (&codec->dev); +return err; + } + +return 0 ; +} +EXPORT_SYMBOL_GPL (snd_hdac_device_register); + +/** +* snd_hdac_device_unregister - unregister the hd-audio codec base device +* codec: the device to unregister +*/ +void snd_hdac_device_unregister (struct hdac_device *codec) +{ +if (device_is_registered (&codec->dev)) { +hda_widget_sysfs_exit (codec); +device_del (&codec->dev); + } +} +EXPORT_SYMBOL_GPL (snd_hdac_device_unregister); + +/** * snd_hdac_make_cmd - compose a 32bit command word to be sent to the * HD-audio controller * @codec: the codec object
sound/hda/hdac_sysfs.c new file +404 -0
404 lines not on this page · raw message
sound/hda/local.h +4 -0
@@ -16,4 +16,8 @@ static inline int get_wcaps_type(unsigned int wcaps) return (wcaps & AC_WCAP_TYPE) >> AC_WCAP_TYPE_SHIFT; } +extern const struct attribute_group *hdac_dev_attr_groups[]; +int hda_widget_sysfs_init (struct hdac_device *codec); +void hda_widget_sysfs_exit (struct hdac_device *codec); +#endif /* __HDAC_LOCAL_H */
sound/pci/hda/hda_bind.c +2 -2
@@ -240,7 +240,7 @@ int snd_hda_codec_configure(struct hda_codec *codec)else codec->probe_id =0 ; - err =device_add (hda_codec_dev (codec)); + err =snd_hdac_device_register (&codec->core);if (err <0 )return err;
@@ -262,7 +262,7 @@ int snd_hda_codec_configure(struct hda_codec *codec)return 0 ; error: -device_del (hda_codec_dev (codec)); +snd_hdac_device_unregister (&codec->core);return err; }EXPORT_SYMBOL_GPL (snd_hda_codec_configure);
sound/pci/hda/hda_codec.c +2 -4
@@ -967,8 +967,7 @@ static int snd_hda_codec_dev_free(struct snd_device *device)struct hda_codec *codec = device->device_data; codec->in_freeing =1 ; -if (device_is_registered (hda_codec_dev (codec))) -device_del (hda_codec_dev (codec)); +snd_hdac_device_unregister (&codec->core);put_device (hda_codec_dev (codec));return 0 ; }
@@ -2182,8 +2181,7 @@ int snd_hda_codec_reset(struct hda_codec *codec)return -EBUSY ;/* OK, let it free */ -if (device_is_registered (hda_codec_dev (codec))) -device_del (hda_codec_dev (codec)); +snd_hdac_device_unregister (&codec->core);/* allow device access again */ snd_hda_unlock_devices (bus);
Signature · 1 line
2.3.3
PATCH 5/7 ALSA: hda - Support indirect execution of verbs
In reply to Takashi IwaiAdd an overriding exec_verb op to struct hdac_device so that the call via snd_hdac_exec_verb() can switch to a different route depending on the setup. The codec driver sets this field so that it can handle the errors or applying quirks appropriately. Furthermore, this mechanism will be used for smooth transition for the regmap support in later patches.
--- include/sound/hdaudio.h | 6 ++++++ sound/hda/hdac_device.c | 24 +++++++++++++++++++++++- sound/pci/hda/hda_codec.c | 12 +++++++----- 3 files changed, 36 insertions(+), 6 deletions(-)
include/sound/hdaudio.h +6 -0
@@ -48,6 +48,10 @@ struct hdac_device {const char *vendor_name;/* codec vendor name */ const char *chip_name;/* codec chip name */ +/* verb exec op override */ +int (*exec_verb)(struct hdac_device *dev,unsigned int cmd, +unsigned int flags,unsigned int *res); +/* widgets */ unsigned int num_nodes;hda_nid_t start_nid, end_nid;
@@ -82,6 +86,8 @@ int snd_hdac_refresh_widgets(struct hdac_device *codec);unsigned int snd_hdac_make_cmd (struct hdac_device *codec,hda_nid_t nid,unsigned int verb,unsigned int parm); +int snd_hdac_exec_verb (struct hdac_device *codec,unsigned int cmd, +unsigned int flags,unsigned int *res);int snd_hdac_read (struct hdac_device *codec,hda_nid_t nid,unsigned int verb,unsigned int parm,unsigned int *res);int snd_hdac_read_parm (struct hdac_device *codec,hda_nid_t nid,int parm);
sound/hda/hdac_device.c +23 -1
@@ -194,6 +194,28 @@ unsigned int snd_hdac_make_cmd(struct hdac_device *codec, hda_nid_t nid,EXPORT_SYMBOL_GPL (snd_hdac_make_cmd);/** +* snd_hdac_exec_verb - execute an encoded verb +* @codec: the codec object +* @cmd: encoded verb to execute +* @flags: optional flags, pass zero for default +* @res: the pointer to store the result, NULL if running async +* +* Returns zero if successful, or a negative error code. +* +* This calls the exec_verb op when set in hdac_codec. If not, +* call the default snd_hdac_bus_exec_verb(). +*/ +int snd_hdac_exec_verb (struct hdac_device *codec,unsigned int cmd, +unsigned int flags,unsigned int *res) +{ +if (codec->exec_verb) +return codec->exec_verb (codec, cmd, flags, res); +return snd_hdac_bus_exec_verb (codec->bus, codec->addr, cmd, res); +} +EXPORT_SYMBOL_GPL (snd_hdac_exec_verb); + + +/** * snd_hdac_read - execute a verb * @codec: the codec object * @nid: NID to execute a verb
@@ -208,7 +230,7 @@ int snd_hdac_read(struct hdac_device *codec, hda_nid_t nid, {unsigned int cmd =snd_hdac_make_cmd (codec, nid, verb, parm); -return snd_hdac_bus_exec_verb (codec->bus, codec->addr, cmd, res); +return snd_hdac_exec_verb (codec, cmd,0 , res); }EXPORT_SYMBOL_GPL (snd_hdac_read);
sound/pci/hda/hda_codec.c +7 -5
@@ -124,11 +124,12 @@ const char *snd_hda_get_jack_type(u32 cfg)EXPORT_SYMBOL_GPL (snd_hda_get_jack_type);/* -* Send and receive a verb +* Send and receive a verb - passed to exec_verb override for hdac_device */ -static int codec_exec_verb (struct hda_codec *codec,unsigned int cmd, -int flags,unsigned int *res) +static int codec_exec_verb (struct hdac_device *dev,unsigned int cmd, +unsigned int flags,unsigned int *res) { + struct hda_codec *codec = container_of(dev, struct hda_codec, core);struct hda_bus *bus = codec->bus;int err;
@@ -177,7 +178,7 @@ unsigned int snd_hda_codec_read(struct hda_codec *codec, hda_nid_t nid, {unsigned int cmd =snd_hdac_make_cmd (&codec->core, nid, verb, parm);unsigned int res; -if (codec_exec_verb (codec, cmd, flags, &res)) +if (snd_hdac_exec_verb (&codec->core, cmd, flags, &res))return -1 ;return res; }
@@ -199,7 +200,7 @@ int snd_hda_codec_write(struct hda_codec *codec, hda_nid_t nid, int flags, unsigned int verb, unsigned int parm) {unsigned int cmd =snd_hdac_make_cmd (&codec->core, nid, verb, parm); -return codec_exec_verb (codec, cmd, flags,NULL ); +return snd_hdac_exec_verb (&codec->core, cmd, flags,NULL ); }EXPORT_SYMBOL_GPL (snd_hda_codec_write);
@@ -1026,6 +1027,7 @@ int snd_hda_codec_new(struct hda_bus *bus, struct snd_card *card, codec->core.dev.release = snd_hda_codec_dev_release; codec->core.type =HDA_DEV_LEGACY ; + codec->core.exec_verb = codec_exec_verb; codec->bus = bus; codec->card = card;
Signature · 1 line
2.3.3
PATCH 6/7 ALSA: hda - Fix possible runtime PM refcount unbalance
In reply to Takashi IwaiWhen the driver is unloaded before the codec is bound, it still keeps the runtime PM refcount up, and results in the unbalance. This patch covers these cases by introducing a flag indicating the runtime PM initialization and handling the codec registration procedure more properly. It also fixes the missing input beep device as a gratis, too.
--- sound/hda/hdac_device.c | 3 +-- sound/pci/hda/hda_bind.c | 1 + sound/pci/hda/hda_codec.c | 30 ++++++++++++++++++++++-------- sound/pci/hda/hda_codec.h | 1 + sound/pci/hda/hda_local.h | 1 + 5 files changed, 26 insertions(+), 10 deletions(-)
sound/hda/hdac_device.c +1 -2
@@ -109,7 +109,6 @@ int snd_hdac_device_init(struct hdac_device *codec, struct hdac_bus *bus,return 0 ; error: -pm_runtime_put_noidle (&codec->dev);put_device (&codec->dev);return err; }
@@ -121,7 +120,7 @@ EXPORT_SYMBOL_GPL(snd_hdac_device_init);*/ void snd_hdac_device_exit (struct hdac_device *codec) { -/* pm_runtime_put_noidle(&codec->dev); */ +pm_runtime_put_noidle (&codec->dev);snd_hdac_bus_remove_device (codec->bus, codec);kfree (codec->vendor_name);kfree (codec->chip_name);
sound/pci/hda/hda_bind.c +1 -0
@@ -95,6 +95,7 @@ static int hda_codec_driver_probe(struct device *dev) err =snd_card_register (codec->card);if (err <0 ) goto error_module; +snd_hda_codec_register (codec); }return 0 ;
sound/pci/hda/hda_codec.c +22 -8
@@ -912,6 +912,13 @@ static void codec_release_pcms(struct hda_codec *codec)void snd_hda_codec_cleanup_for_unbind (struct hda_codec *codec) { +if (codec->registered) { +/* pm_runtime_put() is called in snd_hdac_device_exit() */ +pm_runtime_get_noresume (hda_codec_dev (codec)); +pm_runtime_disable (hda_codec_dev (codec)); + codec->registered =0 ; + } +cancel_delayed_work_sync (&codec->jackpoll_work);if (!codec->in_freeing)snd_hda_ctls_clear (codec);
@@ -943,15 +950,23 @@ void snd_hda_codec_cleanup_for_unbind(struct hda_codec *codec)static unsigned int hda_set_power_state (struct hda_codec *codec,unsigned int power_state); -static int snd_hda_codec_dev_register (struct snd_device *device) +/* also called from hda_bind.c */ +void snd_hda_codec_register (struct hda_codec *codec) { -struct hda_codec *codec = device->device_data; - -snd_hda_register_beep_device (codec); -if (device_is_registered (hda_codec_dev (codec))) +if (codec->registered) +return ; +if (device_is_registered (hda_codec_dev (codec))) { +snd_hda_register_beep_device (codec);pm_runtime_enable (hda_codec_dev (codec)); -/* it was powered up in snd_hda_codec_new(), now all done */ -snd_hda_power_down (codec); +/* it was powered up in snd_hda_codec_new(), now all done */ +snd_hda_power_down (codec); + codec->registered =1 ; + } +} + +static int snd_hda_codec_dev_register (struct snd_device *device) +{ +snd_hda_codec_register (device->device_data);return 0 ; }
@@ -1094,7 +1109,6 @@ int snd_hda_codec_new(struct hda_bus *bus, struct snd_card *card,return 0 ; error: -pm_runtime_put_noidle (hda_codec_dev (codec));put_device (hda_codec_dev (codec));return err; }
sound/pci/hda/hda_codec.h +1 -0
@@ -314,6 +314,7 @@ struct hda_codec {/* misc flags */ unsigned int in_freeing:1; /* being released */ + unsigned int registered:1; /* codec was registered */ unsigned int spdif_status_reset :1; /* needs to toggle SPDIF for each* status change * (e.g. Realtek codecs)
sound/pci/hda/hda_local.h +1 -0
@@ -150,6 +150,7 @@ int __snd_hda_add_vmaster(struct hda_codec *codec, char *name,#define snd_hda_add_vmaster (codec, name, tlv, slaves, suffix) \ __snd_hda_add_vmaster(codec, name, tlv, slaves, suffix, true, NULL)int snd_hda_codec_reset (struct hda_codec *codec); +void snd_hda_codec_register (struct hda_codec *codec);void snd_hda_codec_cleanup_for_unbind (struct hda_codec *codec);enum {
Signature · 1 line
2.3.3
PATCH 7/7 ALSA: hda - Re-add tracepoints to HD-audio core driver
In reply to Takashi IwaiNow let's take the basic tracepoints back to the HD-audio driver. The three bus tracepoints, hda_send_cmd, hda_get_response and hda_unsol_event are revived but in a slightly different form. Since we don't assign the card number there, print the bus device name instead.
--- sound/hda/Makefile | 3 ++ sound/hda/hdac_bus.c | 7 ++- sound/hda/trace.c | 6 +++ sound/hda/trace.h | 62 ++++++++++++++++++++++++ sound/pci/hda/Makefile | 1 - sound/pci/hda/hda_trace.h | 119 ---------------------------------------------- 6 files changed, 77 insertions(+), 121 deletions(-) create mode 100644 sound/hda/trace.c create mode 100644 sound/hda/trace.h delete mode 100644 sound/pci/hda/hda_trace.h
sound/hda/Makefile +3 -0
@@ -1,3 +1,6 @@ snd-hda-core-objs := hda_bus_type.o hdac_bus.o hdac_device.o hdac_sysfs.o +snd-hda-core-objs += trace.o +CFLAGS_trace.o := -I$(src) + obj-$(CONFIG_SND_HDA_CORE) += snd-hda-core.o
sound/hda/hdac_bus.c +6 -1
@@ -7,6 +7,7 @@#include <linux/module.h> #include <linux/export.h> #include <sound/hdaudio.h> +#include "trace.h" static void process_unsol_events (struct work_struct *work);
@@ -82,6 +83,7 @@ int snd_hdac_bus_exec_verb_unlocked(struct hdac_bus *bus, unsigned int addr,else if (bus->sync_write) res = &tmp;for (;;) { +trace_hda_send_cmd (bus, cmd); err = bus->ops->command (bus, cmd);if (err != -EAGAIN )break ;
@@ -90,8 +92,10 @@ int snd_hdac_bus_exec_verb_unlocked(struct hdac_bus *bus, unsigned int addr,if (err)break ; } -if (!err && res) +if (!err && res) { err = bus->ops->get_response (bus, addr, res); +trace_hda_get_response (bus, addr, *res); + }return err; }EXPORT_SYMBOL_GPL (snd_hdac_bus_exec_verb_unlocked);
@@ -113,6 +117,7 @@ void snd_hdac_bus_queue_event(struct hdac_bus *bus, u32 res, u32 res_ex)if (!bus)return ; +trace_hda_unsol_event (bus, res, res_ex); wp = (bus->unsol_wp +1 ) %HDA_UNSOL_QUEUE_SIZE ; bus->unsol_wp = wp;
sound/hda/trace.c new file +6 -0
@@ -0,0 +1,6 @@ +/* +* tracepoint definitions for HD-audio core drivers +*/ + +#define CREATE_TRACE_POINTS +#include "trace.h"
sound/hda/trace.h new file +62 -0
62 lines not on this page · raw message
sound/pci/hda/Makefile +0 -1
@@ -10,7 +10,6 @@ snd-hda-codec-$(CONFIG_SND_HDA_HWDEP) += hda_hwdep.o snd-hda-codec-$(CONFIG_SND_HDA_INPUT_BEEP) += hda_beep.o # for trace-points -CFLAGS_hda_codec.o := -I$(src) CFLAGS_hda_controller.o := -I$(src) snd-hda-codec-generic-objs := hda_generic.o
sound/pci/hda/hda_trace.h deleted +0 -119
119 lines not on this page · raw message
Signature · 1 line
2.3.3
At Wed, 18 Mar 2015 16:16:30 +0100,
Quoted 10 lines · Takashi Iwai
Hi,
this is the patchset I mentioned in the previous post -- moving some HD-audio core stuff into
sound/hda/directory. As of now, only the codec drivers are split tosound/hda/. The legacy bus (controller) driver still remains almost intact, but the split of the core controller driver is also planned, and will be finished hopefully before 4.1 merge window.
Quoted 5 lines
The original patches are found in topic/hda-core branch of sound git tree. The patches posted here are the ones rebased on top of the previous widget PM patches, and found in test/hda-core branch. Once when the widget PM patches get merged, I'll adjust this patchset on top of it.
FYI, I rebased and merged the branch to for-next now. alsa-driver-build git tree and hda-emu git tree were updated for following this change as well.
Takashi
Quoted 73 lines
Takashi
===
Takashi Iwai (7):
ALSA: hda - Makesnd_hda_bus_typepublic
ALSA: hda - Move some codes up tohdac_busstruct
ALSA: hda - Move a part ofhda_codecstuff intohdac_device
ALSA: hda - Add widget sysfs tree
ALSA: hda - Support indirect execution of verbs
ALSA: hda - Fix possible runtime PM refcount unbalance
ALSA: hda - Re-add tracepoints to HD-audio core driverinclude/sound/hdaudio.h | 181 ++++++++++++ sound/Kconfig | 2 + sound/Makefile | 2 +- sound/hda/Kconfig | 2 + sound/hda/Makefile | 6 + sound/hda/hda_bus_type.c | 42 +++ sound/hda/hdac_bus.c | 186 +++++++++++++ sound/hda/hdac_device.c | 527 +++++++++++++++++++++++++++++++++++ sound/hda/hdac_sysfs.c | 404 +++++++++++++++++++++++++++ sound/hda/local.h | 23 ++ sound/hda/trace.c | 6 + sound/hda/trace.h | 62 +++++ sound/pci/hda/Kconfig | 1 + sound/pci/hda/Makefile | 1 - sound/pci/hda/hda_auto_parser.c | 33 ++- sound/pci/hda/hda_beep.c | 4 +- sound/pci/hda/hda_bind.c | 157 +++-------- sound/pci/hda/hda_codec.c | 600 +++++++++------------------------------- sound/pci/hda/hda_codec.h | 87 ++---- sound/pci/hda/hda_controller.c | 8 +- sound/pci/hda/hda_generic.c | 25 +- sound/pci/hda/hda_intel.c | 4 +- sound/pci/hda/hda_local.h | 16 +- sound/pci/hda/hda_proc.c | 42 +-- sound/pci/hda/hda_sysfs.c | 60 ++-- sound/pci/hda/hda_trace.h | 119 -------- sound/pci/hda/local.h | 39 +++ sound/pci/hda/patch_analog.c | 2 +- sound/pci/hda/patch_ca0132.c | 6 +- sound/pci/hda/patch_conexant.c | 20 +- sound/pci/hda/patch_hdmi.c | 20 +- sound/pci/hda/patch_realtek.c | 78 +++--- sound/pci/hda/patch_si3054.c | 6 +- sound/pci/hda/patch_sigmatel.c | 84 +++--- sound/pci/hda/patch_via.c | 23 +- sound/pci/hda/thinkpad_helper.c | 2 +- 36 files changed, 1895 insertions(+), 985 deletions(-) create mode 100644 include/sound/hdaudio.h create mode 100644 sound/hda/Kconfig create mode 100644 sound/hda/Makefile create mode 100644 sound/hda/hda_bus_type.c create mode 100644 sound/hda/hdac_bus.c create mode 100644 sound/hda/hdac_device.c create mode 100644 sound/hda/hdac_sysfs.c create mode 100644 sound/hda/local.h create mode 100644 sound/hda/trace.c create mode 100644 sound/hda/trace.h delete mode 100644 sound/pci/hda/hda_trace.h create mode 100644 sound/pci/hda/local.hSignature · 6 lines
2.3.3 _______________________________________________ Alsa-devel mailing list [email protected] http://mailman.alsa-project.org/mailman/listinfo/alsa-devel