aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-09-04 14:46:02 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-09-04 14:46:02 -0400
commitabebcdfb64f1b39eeeb14282d9cd4aad1ed86f8d (patch)
tree2c5ac5569cf4d101dd12732ae2ea5cd368cd0a13 /include
parent670c039deeffb5c0a3a900de53b95dba781aaf89 (diff)
parentd5f362a7b977bdfaf8a955f3d604a29267bd5464 (diff)
Merge tag 'sound-4.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound updates from Takashi Iwai: "There are little changes in core part, but lots of development are found in drivers, especially ASoC. The diffstat shows regmap-related changes for a slight API additions / changes, and that's all. Looking at the code size statistics, the most significant addition is for Intel Skylake. (Note that SKL support is still underway, the codec driver is missing.) Also STI controller driver is a major addition as well as a few new codec drivers. In HD-audio side, there are fewer changes than the past. The noticeable change is the support of ELD notification from i915 graphics driver. Thus this pull request carries a few changes in drm/i915. Other than that, USB-audio got a rewrite of runtime PM code. It was initiated by lockdep warning, but resulted in a good cleanup in the end. Below are the highlights: Common: - Factoring out of AC'97 reset code from ASoC into the core helper - A few regmap API extensions (in case it's not pulled yet) ASoC: - New drivers for Cirrus CS4349, GTM601, InvenSense ICS43432, Realtek RT298 and ST STI controllers - Machine drivers for Rockchip systems with MAX98090 and RT5645 and RT5650 - Initial driver support for Intel Skylake devices - Lots of rsnd cleanup and enhancements - A few DAPM fixes and cleanups - A large number of cleanups in various drivers (conversion and standardized to regmap, component) mostly by Lars-Peter and Axel HD-audio: - Extended HD-audio core for Intel Skylake controller support - Quirks for Dell headsets, Alienware 15 - Clean up of pin-based quirk tables for Realtek codecs - ELD notifier implenetation for Intel HDMI/DP USB-audio: - Refactor runtime PM code to make lockdep happier" * tag 'sound-4.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (411 commits) drm/i915: Add locks around audio component bind/unbind drm/i915: Drop port_mst_index parameter from pin/eld callback ALSA: hda - Fix missing inline for dummy snd_hdac_set_codec_wakeup() ALSA: hda - Wake the codec up on pin/ELD notify events ALSA: hda - allow codecs to access the i915 pin/ELD callback drm/i915: Call audio pin/ELD notify function drm/i915: Add audio pin sense / ELD callback ASoC: zx296702-i2s: Fix resource leak when unload module ASoC: sti_uniperif: Ensure component is unregistered when unload module ASoC: au1x: psc-i2s: Convert to use devm_ioremap_resource ASoC: sh: dma-sh7760: Convert to devm_snd_soc_register_platform ASoC: spear_pcm: Use devm_snd_dmaengine_pcm_register to fix resource leak ALSA: fireworks/bebob/dice/oxfw: fix substreams counting at vmalloc failure ASoC: Clean up docbook warnings ASoC: txx9: Convert to devm_snd_soc_register_platform ASoC: pxa: Convert to devm_snd_soc_register_platform ASoC: nuc900: Convert to devm_snd_soc_register_platform ASoC: blackfin: Convert to devm_snd_soc_register_platform ASoC: au1x: Convert to devm_snd_soc_register_platform ASoC: qcom: Constify asoc_qcom_lpass_cpu_dai_ops ...
Diffstat (limited to 'include')
-rw-r--r--include/drm/i915_component.h11
-rw-r--r--include/linux/mfd/arizona/registers.h37
-rw-r--r--include/linux/regmap.h28
-rw-r--r--include/sound/ac97_codec.h2
-rw-r--r--include/sound/hda_i915.h9
-rw-r--r--include/sound/hda_register.h4
-rw-r--r--include/sound/hdaudio.h19
-rw-r--r--include/sound/hdaudio_ext.h71
-rw-r--r--include/sound/rcar_snd.h14
-rw-r--r--include/sound/rt298.h20
-rw-r--r--include/sound/soc-dapm.h84
-rw-r--r--include/sound/soc-topology.h13
-rw-r--r--include/sound/soc.h29
-rw-r--r--include/trace/events/asoc.h53
14 files changed, 318 insertions, 76 deletions
diff --git a/include/drm/i915_component.h b/include/drm/i915_component.h
index c9a8b64aa33b..b2d56dd483d9 100644
--- a/include/drm/i915_component.h
+++ b/include/drm/i915_component.h
@@ -34,6 +34,17 @@ struct i915_audio_component {
34 void (*codec_wake_override)(struct device *, bool enable); 34 void (*codec_wake_override)(struct device *, bool enable);
35 int (*get_cdclk_freq)(struct device *); 35 int (*get_cdclk_freq)(struct device *);
36 } *ops; 36 } *ops;
37
38 const struct i915_audio_component_audio_ops {
39 void *audio_ptr;
40 /**
41 * Call from i915 driver, notifying the HDA driver that
42 * pin sense and/or ELD information has changed.
43 * @audio_ptr: HDA driver object
44 * @port: Which port has changed (PORTA / PORTB / PORTC etc)
45 */
46 void (*pin_eld_notify)(void *audio_ptr, int port);
47 } *audio_ops;
37}; 48};
38 49
39#endif /* _I915_COMPONENT_H_ */ 50#endif /* _I915_COMPONENT_H_ */
diff --git a/include/linux/mfd/arizona/registers.h b/include/linux/mfd/arizona/registers.h
index 5c39dc5d279e..fdd70b3c7418 100644
--- a/include/linux/mfd/arizona/registers.h
+++ b/include/linux/mfd/arizona/registers.h
@@ -39,6 +39,7 @@
39#define ARIZONA_PWM_DRIVE_3 0x32 39#define ARIZONA_PWM_DRIVE_3 0x32
40#define ARIZONA_WAKE_CONTROL 0x40 40#define ARIZONA_WAKE_CONTROL 0x40
41#define ARIZONA_SEQUENCE_CONTROL 0x41 41#define ARIZONA_SEQUENCE_CONTROL 0x41
42#define ARIZONA_SPARE_TRIGGERS 0x42
42#define ARIZONA_SAMPLE_RATE_SEQUENCE_SELECT_1 0x61 43#define ARIZONA_SAMPLE_RATE_SEQUENCE_SELECT_1 0x61
43#define ARIZONA_SAMPLE_RATE_SEQUENCE_SELECT_2 0x62 44#define ARIZONA_SAMPLE_RATE_SEQUENCE_SELECT_2 0x62
44#define ARIZONA_SAMPLE_RATE_SEQUENCE_SELECT_3 0x63 45#define ARIZONA_SAMPLE_RATE_SEQUENCE_SELECT_3 0x63
@@ -1452,6 +1453,42 @@
1452#define ARIZONA_WSEQ_ENA_JD2_RISE_WIDTH 1 /* WSEQ_ENA_JD2_RISE */ 1453#define ARIZONA_WSEQ_ENA_JD2_RISE_WIDTH 1 /* WSEQ_ENA_JD2_RISE */
1453 1454
1454/* 1455/*
1456 * R66 (0x42) - Spare Triggers
1457 */
1458#define ARIZONA_WS_TRG8 0x0080 /* WS_TRG8 */
1459#define ARIZONA_WS_TRG8_MASK 0x0080 /* WS_TRG8 */
1460#define ARIZONA_WS_TRG8_SHIFT 7 /* WS_TRG8 */
1461#define ARIZONA_WS_TRG8_WIDTH 1 /* WS_TRG8 */
1462#define ARIZONA_WS_TRG7 0x0040 /* WS_TRG7 */
1463#define ARIZONA_WS_TRG7_MASK 0x0040 /* WS_TRG7 */
1464#define ARIZONA_WS_TRG7_SHIFT 6 /* WS_TRG7 */
1465#define ARIZONA_WS_TRG7_WIDTH 1 /* WS_TRG7 */
1466#define ARIZONA_WS_TRG6 0x0020 /* WS_TRG6 */
1467#define ARIZONA_WS_TRG6_MASK 0x0020 /* WS_TRG6 */
1468#define ARIZONA_WS_TRG6_SHIFT 5 /* WS_TRG6 */
1469#define ARIZONA_WS_TRG6_WIDTH 1 /* WS_TRG6 */
1470#define ARIZONA_WS_TRG5 0x0010 /* WS_TRG5 */
1471#define ARIZONA_WS_TRG5_MASK 0x0010 /* WS_TRG5 */
1472#define ARIZONA_WS_TRG5_SHIFT 4 /* WS_TRG5 */
1473#define ARIZONA_WS_TRG5_WIDTH 1 /* WS_TRG5 */
1474#define ARIZONA_WS_TRG4 0x0008 /* WS_TRG4 */
1475#define ARIZONA_WS_TRG4_MASK 0x0008 /* WS_TRG4 */
1476#define ARIZONA_WS_TRG4_SHIFT 3 /* WS_TRG4 */
1477#define ARIZONA_WS_TRG4_WIDTH 1 /* WS_TRG4 */
1478#define ARIZONA_WS_TRG3 0x0004 /* WS_TRG3 */
1479#define ARIZONA_WS_TRG3_MASK 0x0004 /* WS_TRG3 */
1480#define ARIZONA_WS_TRG3_SHIFT 2 /* WS_TRG3 */
1481#define ARIZONA_WS_TRG3_WIDTH 1 /* WS_TRG3 */
1482#define ARIZONA_WS_TRG2 0x0002 /* WS_TRG2 */
1483#define ARIZONA_WS_TRG2_MASK 0x0002 /* WS_TRG2 */
1484#define ARIZONA_WS_TRG2_SHIFT 1 /* WS_TRG2 */
1485#define ARIZONA_WS_TRG2_WIDTH 1 /* WS_TRG2 */
1486#define ARIZONA_WS_TRG1 0x0001 /* WS_TRG1 */
1487#define ARIZONA_WS_TRG1_MASK 0x0001 /* WS_TRG1 */
1488#define ARIZONA_WS_TRG1_SHIFT 0 /* WS_TRG1 */
1489#define ARIZONA_WS_TRG1_WIDTH 1 /* WS_TRG1 */
1490
1491/*
1455 * R97 (0x61) - Sample Rate Sequence Select 1 1492 * R97 (0x61) - Sample Rate Sequence Select 1
1456 */ 1493 */
1457#define ARIZONA_WSEQ_SAMPLE_RATE_DETECT_A_SEQ_ADDR_MASK 0x01FF /* WSEQ_SAMPLE_RATE_DETECT_A_SEQ_ADDR - [8:0] */ 1494#define ARIZONA_WSEQ_SAMPLE_RATE_DETECT_A_SEQ_ADDR_MASK 0x01FF /* WSEQ_SAMPLE_RATE_DETECT_A_SEQ_ADDR - [8:0] */
diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index 59c55ea0f0b5..4a6759098769 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -50,6 +50,17 @@ struct reg_default {
50 unsigned int def; 50 unsigned int def;
51}; 51};
52 52
53/**
54 * Register/value pairs for sequences of writes
55 *
56 * @reg: Register address.
57 * @def: Register value.
58 */
59struct reg_sequence {
60 unsigned int reg;
61 unsigned int def;
62};
63
53#ifdef CONFIG_REGMAP 64#ifdef CONFIG_REGMAP
54 65
55enum regmap_endian { 66enum regmap_endian {
@@ -410,10 +421,10 @@ int regmap_raw_write(struct regmap *map, unsigned int reg,
410 const void *val, size_t val_len); 421 const void *val, size_t val_len);
411int regmap_bulk_write(struct regmap *map, unsigned int reg, const void *val, 422int regmap_bulk_write(struct regmap *map, unsigned int reg, const void *val,
412 size_t val_count); 423 size_t val_count);
413int regmap_multi_reg_write(struct regmap *map, const struct reg_default *regs, 424int regmap_multi_reg_write(struct regmap *map, const struct reg_sequence *regs,
414 int num_regs); 425 int num_regs);
415int regmap_multi_reg_write_bypassed(struct regmap *map, 426int regmap_multi_reg_write_bypassed(struct regmap *map,
416 const struct reg_default *regs, 427 const struct reg_sequence *regs,
417 int num_regs); 428 int num_regs);
418int regmap_raw_write_async(struct regmap *map, unsigned int reg, 429int regmap_raw_write_async(struct regmap *map, unsigned int reg,
419 const void *val, size_t val_len); 430 const void *val, size_t val_len);
@@ -424,6 +435,8 @@ int regmap_bulk_read(struct regmap *map, unsigned int reg, void *val,
424 size_t val_count); 435 size_t val_count);
425int regmap_update_bits(struct regmap *map, unsigned int reg, 436int regmap_update_bits(struct regmap *map, unsigned int reg,
426 unsigned int mask, unsigned int val); 437 unsigned int mask, unsigned int val);
438int regmap_write_bits(struct regmap *map, unsigned int reg,
439 unsigned int mask, unsigned int val);
427int regmap_update_bits_async(struct regmap *map, unsigned int reg, 440int regmap_update_bits_async(struct regmap *map, unsigned int reg,
428 unsigned int mask, unsigned int val); 441 unsigned int mask, unsigned int val);
429int regmap_update_bits_check(struct regmap *map, unsigned int reg, 442int regmap_update_bits_check(struct regmap *map, unsigned int reg,
@@ -450,7 +463,7 @@ void regcache_mark_dirty(struct regmap *map);
450bool regmap_check_range_table(struct regmap *map, unsigned int reg, 463bool regmap_check_range_table(struct regmap *map, unsigned int reg,
451 const struct regmap_access_table *table); 464 const struct regmap_access_table *table);
452 465
453int regmap_register_patch(struct regmap *map, const struct reg_default *regs, 466int regmap_register_patch(struct regmap *map, const struct reg_sequence *regs,
454 int num_regs); 467 int num_regs);
455int regmap_parse_val(struct regmap *map, const void *buf, 468int regmap_parse_val(struct regmap *map, const void *buf,
456 unsigned int *val); 469 unsigned int *val);
@@ -503,6 +516,8 @@ int regmap_field_update_bits(struct regmap_field *field,
503 516
504int regmap_fields_write(struct regmap_field *field, unsigned int id, 517int regmap_fields_write(struct regmap_field *field, unsigned int id,
505 unsigned int val); 518 unsigned int val);
519int regmap_fields_force_write(struct regmap_field *field, unsigned int id,
520 unsigned int val);
506int regmap_fields_read(struct regmap_field *field, unsigned int id, 521int regmap_fields_read(struct regmap_field *field, unsigned int id,
507 unsigned int *val); 522 unsigned int *val);
508int regmap_fields_update_bits(struct regmap_field *field, unsigned int id, 523int regmap_fields_update_bits(struct regmap_field *field, unsigned int id,
@@ -645,6 +660,13 @@ static inline int regmap_update_bits(struct regmap *map, unsigned int reg,
645 return -EINVAL; 660 return -EINVAL;
646} 661}
647 662
663static inline int regmap_write_bits(struct regmap *map, unsigned int reg,
664 unsigned int mask, unsigned int val)
665{
666 WARN_ONCE(1, "regmap API is disabled");
667 return -EINVAL;
668}
669
648static inline int regmap_update_bits_async(struct regmap *map, 670static inline int regmap_update_bits_async(struct regmap *map,
649 unsigned int reg, 671 unsigned int reg,
650 unsigned int mask, unsigned int val) 672 unsigned int mask, unsigned int val)
diff --git a/include/sound/ac97_codec.h b/include/sound/ac97_codec.h
index 0e9d75b49bed..74bc85473b58 100644
--- a/include/sound/ac97_codec.h
+++ b/include/sound/ac97_codec.h
@@ -584,6 +584,8 @@ static inline int snd_ac97_update_power(struct snd_ac97 *ac97, int reg,
584void snd_ac97_suspend(struct snd_ac97 *ac97); 584void snd_ac97_suspend(struct snd_ac97 *ac97);
585void snd_ac97_resume(struct snd_ac97 *ac97); 585void snd_ac97_resume(struct snd_ac97 *ac97);
586#endif 586#endif
587int snd_ac97_reset(struct snd_ac97 *ac97, bool try_warm, unsigned int id,
588 unsigned int id_mask);
587 589
588/* quirk types */ 590/* quirk types */
589enum { 591enum {
diff --git a/include/sound/hda_i915.h b/include/sound/hda_i915.h
index adb5ba5cbd9d..930b41e5acf4 100644
--- a/include/sound/hda_i915.h
+++ b/include/sound/hda_i915.h
@@ -4,14 +4,17 @@
4#ifndef __SOUND_HDA_I915_H 4#ifndef __SOUND_HDA_I915_H
5#define __SOUND_HDA_I915_H 5#define __SOUND_HDA_I915_H
6 6
7#include <drm/i915_component.h>
8
7#ifdef CONFIG_SND_HDA_I915 9#ifdef CONFIG_SND_HDA_I915
8int snd_hdac_set_codec_wakeup(struct hdac_bus *bus, bool enable); 10int snd_hdac_set_codec_wakeup(struct hdac_bus *bus, bool enable);
9int snd_hdac_display_power(struct hdac_bus *bus, bool enable); 11int snd_hdac_display_power(struct hdac_bus *bus, bool enable);
10int snd_hdac_get_display_clk(struct hdac_bus *bus); 12int snd_hdac_get_display_clk(struct hdac_bus *bus);
11int snd_hdac_i915_init(struct hdac_bus *bus); 13int snd_hdac_i915_init(struct hdac_bus *bus);
12int snd_hdac_i915_exit(struct hdac_bus *bus); 14int snd_hdac_i915_exit(struct hdac_bus *bus);
15int snd_hdac_i915_register_notifier(const struct i915_audio_component_audio_ops *);
13#else 16#else
14static int snd_hdac_set_codec_wakeup(struct hdac_bus *bus, bool enable) 17static inline int snd_hdac_set_codec_wakeup(struct hdac_bus *bus, bool enable)
15{ 18{
16 return 0; 19 return 0;
17} 20}
@@ -31,6 +34,10 @@ static inline int snd_hdac_i915_exit(struct hdac_bus *bus)
31{ 34{
32 return 0; 35 return 0;
33} 36}
37static inline int snd_hdac_i915_register_notifier(const struct i915_audio_component_audio_ops *ops)
38{
39 return -ENODEV;
40}
34#endif 41#endif
35 42
36#endif /* __SOUND_HDA_I915_H */ 43#endif /* __SOUND_HDA_I915_H */
diff --git a/include/sound/hda_register.h b/include/sound/hda_register.h
index ae995e523ff8..2ae8812d7b1a 100644
--- a/include/sound/hda_register.h
+++ b/include/sound/hda_register.h
@@ -160,6 +160,10 @@ enum { SDI0, SDI1, SDI2, SDI3, SDO0, SDO1, SDO2, SDO3 };
160#define AZX_SPB_BASE 0x08 160#define AZX_SPB_BASE 0x08
161/* Interval used to calculate the iterating register offset */ 161/* Interval used to calculate the iterating register offset */
162#define AZX_SPB_INTERVAL 0x08 162#define AZX_SPB_INTERVAL 0x08
163/* SPIB base */
164#define AZX_SPB_SPIB 0x00
165/* SPIB MAXFIFO base*/
166#define AZX_SPB_MAXFIFO 0x04
163 167
164/* registers of Global Time Synchronization Capability Structure */ 168/* registers of Global Time Synchronization Capability Structure */
165#define AZX_GTS_CAP_ID 0x1 169#define AZX_GTS_CAP_ID 0x1
diff --git a/include/sound/hdaudio.h b/include/sound/hdaudio.h
index 4caf1fde8a4f..49bc836fcd84 100644
--- a/include/sound/hdaudio.h
+++ b/include/sound/hdaudio.h
@@ -119,6 +119,7 @@ int snd_hdac_device_register(struct hdac_device *codec);
119void snd_hdac_device_unregister(struct hdac_device *codec); 119void snd_hdac_device_unregister(struct hdac_device *codec);
120 120
121int snd_hdac_refresh_widgets(struct hdac_device *codec); 121int snd_hdac_refresh_widgets(struct hdac_device *codec);
122int snd_hdac_refresh_widget_sysfs(struct hdac_device *codec);
122 123
123unsigned int snd_hdac_make_cmd(struct hdac_device *codec, hda_nid_t nid, 124unsigned int snd_hdac_make_cmd(struct hdac_device *codec, hda_nid_t nid,
124 unsigned int verb, unsigned int parm); 125 unsigned int verb, unsigned int parm);
@@ -164,15 +165,15 @@ static inline int snd_hdac_read_parm(struct hdac_device *codec, hda_nid_t nid,
164} 165}
165 166
166#ifdef CONFIG_PM 167#ifdef CONFIG_PM
167void snd_hdac_power_up(struct hdac_device *codec); 168int snd_hdac_power_up(struct hdac_device *codec);
168void snd_hdac_power_down(struct hdac_device *codec); 169int snd_hdac_power_down(struct hdac_device *codec);
169void snd_hdac_power_up_pm(struct hdac_device *codec); 170int snd_hdac_power_up_pm(struct hdac_device *codec);
170void snd_hdac_power_down_pm(struct hdac_device *codec); 171int snd_hdac_power_down_pm(struct hdac_device *codec);
171#else 172#else
172static inline void snd_hdac_power_up(struct hdac_device *codec) {} 173static inline int snd_hdac_power_up(struct hdac_device *codec) { return 0; }
173static inline void snd_hdac_power_down(struct hdac_device *codec) {} 174static inline int snd_hdac_power_down(struct hdac_device *codec) { return 0; }
174static inline void snd_hdac_power_up_pm(struct hdac_device *codec) {} 175static inline int snd_hdac_power_up_pm(struct hdac_device *codec) { return 0; }
175static inline void snd_hdac_power_down_pm(struct hdac_device *codec) {} 176static inline int snd_hdac_power_down_pm(struct hdac_device *codec) { return 0; }
176#endif 177#endif
177 178
178/* 179/*
@@ -437,6 +438,8 @@ void snd_hdac_stream_init(struct hdac_bus *bus, struct hdac_stream *azx_dev,
437struct hdac_stream *snd_hdac_stream_assign(struct hdac_bus *bus, 438struct hdac_stream *snd_hdac_stream_assign(struct hdac_bus *bus,
438 struct snd_pcm_substream *substream); 439 struct snd_pcm_substream *substream);
439void snd_hdac_stream_release(struct hdac_stream *azx_dev); 440void snd_hdac_stream_release(struct hdac_stream *azx_dev);
441struct hdac_stream *snd_hdac_get_stream(struct hdac_bus *bus,
442 int dir, int stream_tag);
440 443
441int snd_hdac_stream_setup(struct hdac_stream *azx_dev); 444int snd_hdac_stream_setup(struct hdac_stream *azx_dev);
442void snd_hdac_stream_cleanup(struct hdac_stream *azx_dev); 445void snd_hdac_stream_cleanup(struct hdac_stream *azx_dev);
diff --git a/include/sound/hdaudio_ext.h b/include/sound/hdaudio_ext.h
index 0f89df1511dc..94210dcdb6ea 100644
--- a/include/sound/hdaudio_ext.h
+++ b/include/sound/hdaudio_ext.h
@@ -34,6 +34,7 @@ int snd_hdac_ext_bus_init(struct hdac_ext_bus *sbus, struct device *dev,
34void snd_hdac_ext_bus_exit(struct hdac_ext_bus *sbus); 34void snd_hdac_ext_bus_exit(struct hdac_ext_bus *sbus);
35int snd_hdac_ext_bus_device_init(struct hdac_ext_bus *sbus, int addr); 35int snd_hdac_ext_bus_device_init(struct hdac_ext_bus *sbus, int addr);
36void snd_hdac_ext_bus_device_exit(struct hdac_device *hdev); 36void snd_hdac_ext_bus_device_exit(struct hdac_device *hdev);
37void snd_hdac_ext_bus_device_remove(struct hdac_ext_bus *ebus);
37 38
38#define ebus_to_hbus(ebus) (&(ebus)->bus) 39#define ebus_to_hbus(ebus) (&(ebus)->bus)
39#define hbus_to_ebus(_bus) \ 40#define hbus_to_ebus(_bus) \
@@ -62,6 +63,8 @@ enum hdac_ext_stream_type {
62 * @hstream: hdac_stream 63 * @hstream: hdac_stream
63 * @pphc_addr: processing pipe host stream pointer 64 * @pphc_addr: processing pipe host stream pointer
64 * @pplc_addr: processing pipe link stream pointer 65 * @pplc_addr: processing pipe link stream pointer
66 * @spib_addr: software position in buffers stream pointer
67 * @fifo_addr: software position Max fifos stream pointer
65 * @decoupled: stream host and link is decoupled 68 * @decoupled: stream host and link is decoupled
66 * @link_locked: link is locked 69 * @link_locked: link is locked
67 * @link_prepared: link is prepared 70 * @link_prepared: link is prepared
@@ -73,6 +76,9 @@ struct hdac_ext_stream {
73 void __iomem *pphc_addr; 76 void __iomem *pphc_addr;
74 void __iomem *pplc_addr; 77 void __iomem *pplc_addr;
75 78
79 void __iomem *spib_addr;
80 void __iomem *fifo_addr;
81
76 bool decoupled:1; 82 bool decoupled:1;
77 bool link_locked:1; 83 bool link_locked:1;
78 bool link_prepared; 84 bool link_prepared;
@@ -99,6 +105,11 @@ void snd_hdac_ext_stream_decouple(struct hdac_ext_bus *bus,
99 struct hdac_ext_stream *azx_dev, bool decouple); 105 struct hdac_ext_stream *azx_dev, bool decouple);
100void snd_hdac_ext_stop_streams(struct hdac_ext_bus *sbus); 106void snd_hdac_ext_stop_streams(struct hdac_ext_bus *sbus);
101 107
108int snd_hdac_ext_stream_set_spib(struct hdac_ext_bus *ebus,
109 struct hdac_ext_stream *stream, u32 value);
110int snd_hdac_ext_stream_get_spbmaxfifo(struct hdac_ext_bus *ebus,
111 struct hdac_ext_stream *stream);
112
102void snd_hdac_ext_link_stream_start(struct hdac_ext_stream *hstream); 113void snd_hdac_ext_link_stream_start(struct hdac_ext_stream *hstream);
103void snd_hdac_ext_link_stream_clear(struct hdac_ext_stream *hstream); 114void snd_hdac_ext_link_stream_clear(struct hdac_ext_stream *hstream);
104void snd_hdac_ext_link_stream_reset(struct hdac_ext_stream *hstream); 115void snd_hdac_ext_link_stream_reset(struct hdac_ext_stream *hstream);
@@ -115,6 +126,7 @@ struct hdac_ext_link {
115 126
116int snd_hdac_ext_bus_link_power_up(struct hdac_ext_link *link); 127int snd_hdac_ext_bus_link_power_up(struct hdac_ext_link *link);
117int snd_hdac_ext_bus_link_power_down(struct hdac_ext_link *link); 128int snd_hdac_ext_bus_link_power_down(struct hdac_ext_link *link);
129int snd_hdac_ext_bus_link_power_down_all(struct hdac_ext_bus *ebus);
118void snd_hdac_ext_link_set_stream_id(struct hdac_ext_link *link, 130void snd_hdac_ext_link_set_stream_id(struct hdac_ext_link *link,
119 int stream); 131 int stream);
120void snd_hdac_ext_link_clear_stream_id(struct hdac_ext_link *link, 132void snd_hdac_ext_link_clear_stream_id(struct hdac_ext_link *link,
@@ -129,4 +141,63 @@ void snd_hdac_ext_link_clear_stream_id(struct hdac_ext_link *link,
129 writew(((readw(addr + reg) & ~(mask)) | (val)), \ 141 writew(((readw(addr + reg) & ~(mask)) | (val)), \
130 addr + reg) 142 addr + reg)
131 143
144
145struct hdac_ext_device;
146
147/* ops common to all codec drivers */
148struct hdac_ext_codec_ops {
149 int (*build_controls)(struct hdac_ext_device *dev);
150 int (*init)(struct hdac_ext_device *dev);
151 void (*free)(struct hdac_ext_device *dev);
152};
153
154struct hda_dai_map {
155 char *dai_name;
156 hda_nid_t nid;
157 u32 maxbps;
158};
159
160#define HDA_MAX_NIDS 16
161
162/**
163 * struct hdac_ext_device - HDAC Ext device
164 *
165 * @hdac: hdac core device
166 * @nid_list - the dai map which matches the dai-name with the nid
167 * @map_cur_idx - the idx in use in dai_map
168 * @ops - the hda codec ops common to all codec drivers
169 * @pvt_data - private data, for asoc contains asoc codec object
170 */
171struct hdac_ext_device {
172 struct hdac_device hdac;
173 struct hdac_ext_bus *ebus;
174
175 /* soc-dai to nid map */
176 struct hda_dai_map nid_list[HDA_MAX_NIDS];
177 unsigned int map_cur_idx;
178
179 /* codec ops */
180 struct hdac_ext_codec_ops ops;
181
182 void *private_data;
183};
184
185#define to_ehdac_device(dev) (container_of((dev), \
186 struct hdac_ext_device, hdac))
187/*
188 * HD-audio codec base driver
189 */
190struct hdac_ext_driver {
191 struct hdac_driver hdac;
192
193 int (*probe)(struct hdac_ext_device *dev);
194 int (*remove)(struct hdac_ext_device *dev);
195 void (*shutdown)(struct hdac_ext_device *dev);
196};
197
198int snd_hda_ext_driver_register(struct hdac_ext_driver *drv);
199void snd_hda_ext_driver_unregister(struct hdac_ext_driver *drv);
200
201#define to_ehdac_driver(_drv) container_of(_drv, struct hdac_ext_driver, hdac)
202
132#endif /* __SOUND_HDAUDIO_EXT_H */ 203#endif /* __SOUND_HDAUDIO_EXT_H */
diff --git a/include/sound/rcar_snd.h b/include/sound/rcar_snd.h
index 4cecd0c175f6..bb7b2ebfee7b 100644
--- a/include/sound/rcar_snd.h
+++ b/include/sound/rcar_snd.h
@@ -61,6 +61,14 @@ struct rsnd_src_platform_info {
61/* 61/*
62 * flags 62 * flags
63 */ 63 */
64struct rsnd_ctu_platform_info {
65 u32 flags;
66};
67
68struct rsnd_mix_platform_info {
69 u32 flags;
70};
71
64struct rsnd_dvc_platform_info { 72struct rsnd_dvc_platform_info {
65 u32 flags; 73 u32 flags;
66}; 74};
@@ -68,6 +76,8 @@ struct rsnd_dvc_platform_info {
68struct rsnd_dai_path_info { 76struct rsnd_dai_path_info {
69 struct rsnd_ssi_platform_info *ssi; 77 struct rsnd_ssi_platform_info *ssi;
70 struct rsnd_src_platform_info *src; 78 struct rsnd_src_platform_info *src;
79 struct rsnd_ctu_platform_info *ctu;
80 struct rsnd_mix_platform_info *mix;
71 struct rsnd_dvc_platform_info *dvc; 81 struct rsnd_dvc_platform_info *dvc;
72}; 82};
73 83
@@ -93,6 +103,10 @@ struct rcar_snd_info {
93 int ssi_info_nr; 103 int ssi_info_nr;
94 struct rsnd_src_platform_info *src_info; 104 struct rsnd_src_platform_info *src_info;
95 int src_info_nr; 105 int src_info_nr;
106 struct rsnd_ctu_platform_info *ctu_info;
107 int ctu_info_nr;
108 struct rsnd_mix_platform_info *mix_info;
109 int mix_info_nr;
96 struct rsnd_dvc_platform_info *dvc_info; 110 struct rsnd_dvc_platform_info *dvc_info;
97 int dvc_info_nr; 111 int dvc_info_nr;
98 struct rsnd_dai_platform_info *dai_info; 112 struct rsnd_dai_platform_info *dai_info;
diff --git a/include/sound/rt298.h b/include/sound/rt298.h
new file mode 100644
index 000000000000..7fffeaa84f64
--- /dev/null
+++ b/include/sound/rt298.h
@@ -0,0 +1,20 @@
1/*
2 * linux/sound/rt286.h -- Platform data for RT286
3 *
4 * Copyright 2013 Realtek Microelectronics
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __LINUX_SND_RT298_H
12#define __LINUX_SND_RT298_H
13
14struct rt298_platform_data {
15 bool cbj_en; /*combo jack enable*/
16 bool gpio2_en; /*GPIO2 enable*/
17 bool suspend_power_off; /* power is off during suspend */
18};
19
20#endif
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index 37d95a898275..5abba037d245 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -397,6 +397,7 @@ int snd_soc_dapm_del_routes(struct snd_soc_dapm_context *dapm,
397 const struct snd_soc_dapm_route *route, int num); 397 const struct snd_soc_dapm_route *route, int num);
398int snd_soc_dapm_weak_routes(struct snd_soc_dapm_context *dapm, 398int snd_soc_dapm_weak_routes(struct snd_soc_dapm_context *dapm,
399 const struct snd_soc_dapm_route *route, int num); 399 const struct snd_soc_dapm_route *route, int num);
400void snd_soc_dapm_free_widget(struct snd_soc_dapm_widget *w);
400 401
401/* dapm events */ 402/* dapm events */
402void snd_soc_dapm_stream_event(struct snd_soc_pcm_runtime *rtd, int stream, 403void snd_soc_dapm_stream_event(struct snd_soc_pcm_runtime *rtd, int stream,
@@ -511,9 +512,18 @@ struct snd_soc_dapm_route {
511struct snd_soc_dapm_path { 512struct snd_soc_dapm_path {
512 const char *name; 513 const char *name;
513 514
514 /* source (input) and sink (output) widgets */ 515 /*
515 struct snd_soc_dapm_widget *source; 516 * source (input) and sink (output) widgets
516 struct snd_soc_dapm_widget *sink; 517 * The union is for convience, since it is a lot nicer to type
518 * p->source, rather than p->node[SND_SOC_DAPM_DIR_IN]
519 */
520 union {
521 struct {
522 struct snd_soc_dapm_widget *source;
523 struct snd_soc_dapm_widget *sink;
524 };
525 struct snd_soc_dapm_widget *node[2];
526 };
517 527
518 /* status */ 528 /* status */
519 u32 connect:1; /* source and sink widgets are connected */ 529 u32 connect:1; /* source and sink widgets are connected */
@@ -524,8 +534,7 @@ struct snd_soc_dapm_path {
524 int (*connected)(struct snd_soc_dapm_widget *source, 534 int (*connected)(struct snd_soc_dapm_widget *source,
525 struct snd_soc_dapm_widget *sink); 535 struct snd_soc_dapm_widget *sink);
526 536
527 struct list_head list_source; 537 struct list_head list_node[2];
528 struct list_head list_sink;
529 struct list_head list_kcontrol; 538 struct list_head list_kcontrol;
530 struct list_head list; 539 struct list_head list;
531}; 540};
@@ -559,8 +568,7 @@ struct snd_soc_dapm_widget {
559 unsigned char new_power:1; /* power from this run */ 568 unsigned char new_power:1; /* power from this run */
560 unsigned char power_checked:1; /* power checked this run */ 569 unsigned char power_checked:1; /* power checked this run */
561 unsigned char is_supply:1; /* Widget is a supply type widget */ 570 unsigned char is_supply:1; /* Widget is a supply type widget */
562 unsigned char is_sink:1; /* Widget is a sink type widget */ 571 unsigned char is_ep:2; /* Widget is a endpoint type widget */
563 unsigned char is_source:1; /* Widget is a source type widget */
564 int subseq; /* sort within widget type */ 572 int subseq; /* sort within widget type */
565 573
566 int (*power_check)(struct snd_soc_dapm_widget *w); 574 int (*power_check)(struct snd_soc_dapm_widget *w);
@@ -575,16 +583,14 @@ struct snd_soc_dapm_widget {
575 struct snd_kcontrol **kcontrols; 583 struct snd_kcontrol **kcontrols;
576 struct snd_soc_dobj dobj; 584 struct snd_soc_dobj dobj;
577 585
578 /* widget input and outputs */ 586 /* widget input and output edges */
579 struct list_head sources; 587 struct list_head edges[2];
580 struct list_head sinks;
581 588
582 /* used during DAPM updates */ 589 /* used during DAPM updates */
583 struct list_head work_list; 590 struct list_head work_list;
584 struct list_head power_list; 591 struct list_head power_list;
585 struct list_head dirty; 592 struct list_head dirty;
586 int inputs; 593 int endpoints[2];
587 int outputs;
588 594
589 struct clk *clk; 595 struct clk *clk;
590}; 596};
@@ -672,4 +678,58 @@ static inline enum snd_soc_bias_level snd_soc_dapm_get_bias_level(
672 return dapm->bias_level; 678 return dapm->bias_level;
673} 679}
674 680
681enum snd_soc_dapm_direction {
682 SND_SOC_DAPM_DIR_IN,
683 SND_SOC_DAPM_DIR_OUT
684};
685
686#define SND_SOC_DAPM_DIR_TO_EP(x) BIT(x)
687
688#define SND_SOC_DAPM_EP_SOURCE SND_SOC_DAPM_DIR_TO_EP(SND_SOC_DAPM_DIR_IN)
689#define SND_SOC_DAPM_EP_SINK SND_SOC_DAPM_DIR_TO_EP(SND_SOC_DAPM_DIR_OUT)
690
691/**
692 * snd_soc_dapm_widget_for_each_sink_path - Iterates over all paths in the
693 * specified direction of a widget
694 * @w: The widget
695 * @dir: Whether to iterate over the paths where the specified widget is the
696 * incoming or outgoing widgets
697 * @p: The path iterator variable
698 */
699#define snd_soc_dapm_widget_for_each_path(w, dir, p) \
700 list_for_each_entry(p, &w->edges[dir], list_node[dir])
701
702/**
703 * snd_soc_dapm_widget_for_each_sink_path_safe - Iterates over all paths in the
704 * specified direction of a widget
705 * @w: The widget
706 * @dir: Whether to iterate over the paths where the specified widget is the
707 * incoming or outgoing widgets
708 * @p: The path iterator variable
709 * @next_p: Temporary storage for the next path
710 *
711 * This function works like snd_soc_dapm_widget_for_each_sink_path, expect that
712 * it is safe to remove the current path from the list while iterating
713 */
714#define snd_soc_dapm_widget_for_each_path_safe(w, dir, p, next_p) \
715 list_for_each_entry_safe(p, next_p, &w->edges[dir], list_node[dir])
716
717/**
718 * snd_soc_dapm_widget_for_each_sink_path - Iterates over all paths leaving a
719 * widget
720 * @w: The widget
721 * @p: The path iterator variable
722 */
723#define snd_soc_dapm_widget_for_each_sink_path(w, p) \
724 snd_soc_dapm_widget_for_each_path(w, SND_SOC_DAPM_DIR_IN, p)
725
726/**
727 * snd_soc_dapm_widget_for_each_source_path - Iterates over all paths leading to
728 * a widget
729 * @w: The widget
730 * @p: The path iterator variable
731 */
732#define snd_soc_dapm_widget_for_each_source_path(w, p) \
733 snd_soc_dapm_widget_for_each_path(w, SND_SOC_DAPM_DIR_OUT, p)
734
675#endif 735#endif
diff --git a/include/sound/soc-topology.h b/include/sound/soc-topology.h
index 427bc41df3ae..086cd7ff6ddc 100644
--- a/include/sound/soc-topology.h
+++ b/include/sound/soc-topology.h
@@ -89,6 +89,13 @@ struct snd_soc_tplg_kcontrol_ops {
89 struct snd_ctl_elem_info *uinfo); 89 struct snd_ctl_elem_info *uinfo);
90}; 90};
91 91
92/* Bytes ext operations, for TLV byte controls */
93struct snd_soc_tplg_bytes_ext_ops {
94 u32 id;
95 int (*get)(unsigned int __user *bytes, unsigned int size);
96 int (*put)(const unsigned int __user *bytes, unsigned int size);
97};
98
92/* 99/*
93 * DAPM widget event handlers - used to map handlers onto widgets. 100 * DAPM widget event handlers - used to map handlers onto widgets.
94 */ 101 */
@@ -136,9 +143,13 @@ struct snd_soc_tplg_ops {
136 int (*manifest)(struct snd_soc_component *, 143 int (*manifest)(struct snd_soc_component *,
137 struct snd_soc_tplg_manifest *); 144 struct snd_soc_tplg_manifest *);
138 145
139 /* bespoke kcontrol handlers available for binding */ 146 /* vendor specific kcontrol handlers available for binding */
140 const struct snd_soc_tplg_kcontrol_ops *io_ops; 147 const struct snd_soc_tplg_kcontrol_ops *io_ops;
141 int io_ops_count; 148 int io_ops_count;
149
150 /* vendor specific bytes ext handlers available for binding */
151 const struct snd_soc_tplg_bytes_ext_ops *bytes_ext_ops;
152 int bytes_ext_ops_count;
142}; 153};
143 154
144#ifdef CONFIG_SND_SOC_TOPOLOGY 155#ifdef CONFIG_SND_SOC_TOPOLOGY
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 93df8bf9d54a..884e728b09d9 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -526,7 +526,8 @@ int snd_soc_test_bits(struct snd_soc_codec *codec, unsigned int reg,
526 526
527#ifdef CONFIG_SND_SOC_AC97_BUS 527#ifdef CONFIG_SND_SOC_AC97_BUS
528struct snd_ac97 *snd_soc_alloc_ac97_codec(struct snd_soc_codec *codec); 528struct snd_ac97 *snd_soc_alloc_ac97_codec(struct snd_soc_codec *codec);
529struct snd_ac97 *snd_soc_new_ac97_codec(struct snd_soc_codec *codec); 529struct snd_ac97 *snd_soc_new_ac97_codec(struct snd_soc_codec *codec,
530 unsigned int id, unsigned int id_mask);
530void snd_soc_free_ac97_codec(struct snd_ac97 *ac97); 531void snd_soc_free_ac97_codec(struct snd_ac97 *ac97);
531 532
532int snd_soc_set_ac97_ops(struct snd_ac97_bus_ops *ops); 533int snd_soc_set_ac97_ops(struct snd_ac97_bus_ops *ops);
@@ -619,6 +620,7 @@ int snd_soc_put_strobe(struct snd_kcontrol *kcontrol,
619 * @pin: name of the pin to update 620 * @pin: name of the pin to update
620 * @mask: bits to check for in reported jack status 621 * @mask: bits to check for in reported jack status
621 * @invert: if non-zero then pin is enabled when status is not reported 622 * @invert: if non-zero then pin is enabled when status is not reported
623 * @list: internal list entry
622 */ 624 */
623struct snd_soc_jack_pin { 625struct snd_soc_jack_pin {
624 struct list_head list; 626 struct list_head list;
@@ -635,7 +637,7 @@ struct snd_soc_jack_pin {
635 * @jack_type: type of jack that is expected for this voltage 637 * @jack_type: type of jack that is expected for this voltage
636 * @debounce_time: debounce_time for jack, codec driver should wait for this 638 * @debounce_time: debounce_time for jack, codec driver should wait for this
637 * duration before reading the adc for voltages 639 * duration before reading the adc for voltages
638 * @:list: list container 640 * @list: internal list entry
639 */ 641 */
640struct snd_soc_jack_zone { 642struct snd_soc_jack_zone {
641 unsigned int min_mv; 643 unsigned int min_mv;
@@ -651,12 +653,12 @@ struct snd_soc_jack_zone {
651 * @gpio: legacy gpio number 653 * @gpio: legacy gpio number
652 * @idx: gpio descriptor index within the function of the GPIO 654 * @idx: gpio descriptor index within the function of the GPIO
653 * consumer device 655 * consumer device
654 * @gpiod_dev GPIO consumer device 656 * @gpiod_dev: GPIO consumer device
655 * @name: gpio name. Also as connection ID for the GPIO consumer 657 * @name: gpio name. Also as connection ID for the GPIO consumer
656 * device function name lookup 658 * device function name lookup
657 * @report: value to report when jack detected 659 * @report: value to report when jack detected
658 * @invert: report presence in low state 660 * @invert: report presence in low state
659 * @debouce_time: debouce time in ms 661 * @debounce_time: debounce time in ms
660 * @wake: enable as wake source 662 * @wake: enable as wake source
661 * @jack_status_check: callback function which overrides the detection 663 * @jack_status_check: callback function which overrides the detection
662 * to provide more complex checks (eg, reading an 664 * to provide more complex checks (eg, reading an
@@ -672,11 +674,13 @@ struct snd_soc_jack_gpio {
672 int debounce_time; 674 int debounce_time;
673 bool wake; 675 bool wake;
674 676
677 /* private: */
675 struct snd_soc_jack *jack; 678 struct snd_soc_jack *jack;
676 struct delayed_work work; 679 struct delayed_work work;
677 struct gpio_desc *desc; 680 struct gpio_desc *desc;
678 681
679 void *data; 682 void *data;
683 /* public: */
680 int (*jack_status_check)(void *data); 684 int (*jack_status_check)(void *data);
681}; 685};
682 686
@@ -758,7 +762,6 @@ struct snd_soc_component {
758 762
759 unsigned int ignore_pmdown_time:1; /* pmdown_time is ignored at stop */ 763 unsigned int ignore_pmdown_time:1; /* pmdown_time is ignored at stop */
760 unsigned int registered_as_component:1; 764 unsigned int registered_as_component:1;
761 unsigned int probed:1;
762 765
763 struct list_head list; 766 struct list_head list;
764 767
@@ -792,7 +795,6 @@ struct snd_soc_component {
792 795
793 /* Don't use these, use snd_soc_component_get_dapm() */ 796 /* Don't use these, use snd_soc_component_get_dapm() */
794 struct snd_soc_dapm_context dapm; 797 struct snd_soc_dapm_context dapm;
795 struct snd_soc_dapm_context *dapm_ptr;
796 798
797 const struct snd_kcontrol_new *controls; 799 const struct snd_kcontrol_new *controls;
798 unsigned int num_controls; 800 unsigned int num_controls;
@@ -832,9 +834,6 @@ struct snd_soc_codec {
832 /* component */ 834 /* component */
833 struct snd_soc_component component; 835 struct snd_soc_component component;
834 836
835 /* Don't access this directly, use snd_soc_codec_get_dapm() */
836 struct snd_soc_dapm_context dapm;
837
838#ifdef CONFIG_DEBUG_FS 837#ifdef CONFIG_DEBUG_FS
839 struct dentry *debugfs_reg; 838 struct dentry *debugfs_reg;
840#endif 839#endif
@@ -1277,7 +1276,7 @@ static inline struct snd_soc_component *snd_soc_dapm_to_component(
1277static inline struct snd_soc_codec *snd_soc_dapm_to_codec( 1276static inline struct snd_soc_codec *snd_soc_dapm_to_codec(
1278 struct snd_soc_dapm_context *dapm) 1277 struct snd_soc_dapm_context *dapm)
1279{ 1278{
1280 return container_of(dapm, struct snd_soc_codec, dapm); 1279 return snd_soc_component_to_codec(snd_soc_dapm_to_component(dapm));
1281} 1280}
1282 1281
1283/** 1282/**
@@ -1302,7 +1301,7 @@ static inline struct snd_soc_platform *snd_soc_dapm_to_platform(
1302static inline struct snd_soc_dapm_context *snd_soc_component_get_dapm( 1301static inline struct snd_soc_dapm_context *snd_soc_component_get_dapm(
1303 struct snd_soc_component *component) 1302 struct snd_soc_component *component)
1304{ 1303{
1305 return component->dapm_ptr; 1304 return &component->dapm;
1306} 1305}
1307 1306
1308/** 1307/**
@@ -1314,12 +1313,12 @@ static inline struct snd_soc_dapm_context *snd_soc_component_get_dapm(
1314static inline struct snd_soc_dapm_context *snd_soc_codec_get_dapm( 1313static inline struct snd_soc_dapm_context *snd_soc_codec_get_dapm(
1315 struct snd_soc_codec *codec) 1314 struct snd_soc_codec *codec)
1316{ 1315{
1317 return &codec->dapm; 1316 return snd_soc_component_get_dapm(&codec->component);
1318} 1317}
1319 1318
1320/** 1319/**
1321 * snd_soc_dapm_init_bias_level() - Initialize CODEC DAPM bias level 1320 * snd_soc_dapm_init_bias_level() - Initialize CODEC DAPM bias level
1322 * @dapm: The CODEC for which to initialize the DAPM bias level 1321 * @codec: The CODEC for which to initialize the DAPM bias level
1323 * @level: The DAPM level to initialize to 1322 * @level: The DAPM level to initialize to
1324 * 1323 *
1325 * Initializes the CODEC DAPM bias level. See snd_soc_dapm_init_bias_level(). 1324 * Initializes the CODEC DAPM bias level. See snd_soc_dapm_init_bias_level().
@@ -1604,6 +1603,10 @@ int snd_soc_of_parse_audio_simple_widgets(struct snd_soc_card *card,
1604int snd_soc_of_parse_tdm_slot(struct device_node *np, 1603int snd_soc_of_parse_tdm_slot(struct device_node *np,
1605 unsigned int *slots, 1604 unsigned int *slots,
1606 unsigned int *slot_width); 1605 unsigned int *slot_width);
1606void snd_soc_of_parse_audio_prefix(struct snd_soc_card *card,
1607 struct snd_soc_codec_conf *codec_conf,
1608 struct device_node *of_node,
1609 const char *propname);
1607int snd_soc_of_parse_audio_routing(struct snd_soc_card *card, 1610int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
1608 const char *propname); 1611 const char *propname);
1609unsigned int snd_soc_of_parse_daifmt(struct device_node *np, 1612unsigned int snd_soc_of_parse_daifmt(struct device_node *np,
diff --git a/include/trace/events/asoc.h b/include/trace/events/asoc.h
index 88cf39d96d0f..317a1ed2f4ac 100644
--- a/include/trace/events/asoc.h
+++ b/include/trace/events/asoc.h
@@ -8,6 +8,7 @@
8#include <linux/tracepoint.h> 8#include <linux/tracepoint.h>
9 9
10#define DAPM_DIRECT "(direct)" 10#define DAPM_DIRECT "(direct)"
11#define DAPM_ARROW(dir) (((dir) == SND_SOC_DAPM_DIR_OUT) ? "->" : "<-")
11 12
12struct snd_soc_jack; 13struct snd_soc_jack;
13struct snd_soc_codec; 14struct snd_soc_codec;
@@ -152,62 +153,38 @@ TRACE_EVENT(snd_soc_dapm_walk_done,
152 (int)__entry->path_checks, (int)__entry->neighbour_checks) 153 (int)__entry->path_checks, (int)__entry->neighbour_checks)
153); 154);
154 155
155TRACE_EVENT(snd_soc_dapm_output_path, 156TRACE_EVENT(snd_soc_dapm_path,
156 157
157 TP_PROTO(struct snd_soc_dapm_widget *widget, 158 TP_PROTO(struct snd_soc_dapm_widget *widget,
159 enum snd_soc_dapm_direction dir,
158 struct snd_soc_dapm_path *path), 160 struct snd_soc_dapm_path *path),
159 161
160 TP_ARGS(widget, path), 162 TP_ARGS(widget, dir, path),
161 163
162 TP_STRUCT__entry( 164 TP_STRUCT__entry(
163 __string( wname, widget->name ) 165 __string( wname, widget->name )
164 __string( pname, path->name ? path->name : DAPM_DIRECT) 166 __string( pname, path->name ? path->name : DAPM_DIRECT)
165 __string( psname, path->sink->name ) 167 __string( pnname, path->node[dir]->name )
166 __field( int, path_sink ) 168 __field( int, path_node )
167 __field( int, path_connect ) 169 __field( int, path_connect )
170 __field( int, path_dir )
168 ), 171 ),
169 172
170 TP_fast_assign( 173 TP_fast_assign(
171 __assign_str(wname, widget->name); 174 __assign_str(wname, widget->name);
172 __assign_str(pname, path->name ? path->name : DAPM_DIRECT); 175 __assign_str(pname, path->name ? path->name : DAPM_DIRECT);
173 __assign_str(psname, path->sink->name); 176 __assign_str(pnname, path->node[dir]->name);
174 __entry->path_connect = path->connect; 177 __entry->path_connect = path->connect;
175 __entry->path_sink = (long)path->sink; 178 __entry->path_node = (long)path->node[dir];
179 __entry->path_dir = dir;
176 ), 180 ),
177 181
178 TP_printk("%c%s -> %s -> %s", 182 TP_printk("%c%s %s %s %s %s",
179 (int) __entry->path_sink && 183 (int) __entry->path_node &&
180 (int) __entry->path_connect ? '*' : ' ', 184 (int) __entry->path_connect ? '*' : ' ',
181 __get_str(wname), __get_str(pname), __get_str(psname)) 185 __get_str(wname), DAPM_ARROW(__entry->path_dir),
182); 186 __get_str(pname), DAPM_ARROW(__entry->path_dir),
183 187 __get_str(pnname))
184TRACE_EVENT(snd_soc_dapm_input_path,
185
186 TP_PROTO(struct snd_soc_dapm_widget *widget,
187 struct snd_soc_dapm_path *path),
188
189 TP_ARGS(widget, path),
190
191 TP_STRUCT__entry(
192 __string( wname, widget->name )
193 __string( pname, path->name ? path->name : DAPM_DIRECT)
194 __string( psname, path->source->name )
195 __field( int, path_source )
196 __field( int, path_connect )
197 ),
198
199 TP_fast_assign(
200 __assign_str(wname, widget->name);
201 __assign_str(pname, path->name ? path->name : DAPM_DIRECT);
202 __assign_str(psname, path->source->name);
203 __entry->path_connect = path->connect;
204 __entry->path_source = (long)path->source;
205 ),
206
207 TP_printk("%c%s <- %s <- %s",
208 (int) __entry->path_source &&
209 (int) __entry->path_connect ? '*' : ' ',
210 __get_str(wname), __get_str(pname), __get_str(psname))
211); 188);
212 189
213TRACE_EVENT(snd_soc_dapm_connected, 190TRACE_EVENT(snd_soc_dapm_connected,