View | Details | Raw Unified | Return to bug 197785
Collapse All | Expand All

(-)a/drivers/gpu/drm/i915/intel_audio.c (+18 lines)
Lines 698-703 static void i915_audio_component_put_power(struct device *kdev) Link Here
698
	intel_display_power_put(kdev_to_i915(kdev), POWER_DOMAIN_AUDIO);
698
	intel_display_power_put(kdev_to_i915(kdev), POWER_DOMAIN_AUDIO);
699
}
699
}
700
700
701
#define HSW_PWR_WELL_DRIVER                     _MMIO(0x45404)
702
703
static int i915_audio_readmisc(struct device *kdev)
704
{
705
	struct drm_i915_private *dev_priv = kdev_to_i915(kdev);
706
	uint32_t cdclk_tmp = I915_READ(CDCLK_CTL);
707
	uint32_t AudChickenbit = I915_READ(HSW_AUD_CHICKENBIT);
708
	uint32_t PwCtl2 = I915_READ(HSW_PWR_WELL_DRIVER);
709
710
	printk("%s %d\n",__func__,__LINE__);
711
	printk("%s HSW_AUD_CHICKENBIT=0x%x\n",__func__,AudChickenbit);
712
	printk("%s cdclk_ctl =0x%x\n",__func__,cdclk_tmp );
713
	printk("%s  cdclk_freq=0x%x\n",__func__, I915_READ(CDCLK_FREQ));
714
	printk("%s PWR_WELL_CTL2 =0x%x\n",__func__, PwCtl2 );
715
	return 0;
716
}
717
701
static void i915_audio_component_codec_wake_override(struct device *kdev,
718
static void i915_audio_component_codec_wake_override(struct device *kdev,
702
						     bool enable)
719
						     bool enable)
703
{
720
{
Lines 868-873 static int i915_audio_component_get_eld(struct device *kdev, int port, Link Here
868
	.get_cdclk_freq	= i915_audio_component_get_cdclk_freq,
885
	.get_cdclk_freq	= i915_audio_component_get_cdclk_freq,
869
	.sync_audio_rate = i915_audio_component_sync_audio_rate,
886
	.sync_audio_rate = i915_audio_component_sync_audio_rate,
870
	.get_eld	= i915_audio_component_get_eld,
887
	.get_eld	= i915_audio_component_get_eld,
888
	.readmisc	= i915_audio_readmisc,
871
};
889
};
872
890
873
static int i915_audio_component_bind(struct device *i915_kdev,
891
static int i915_audio_component_bind(struct device *i915_kdev,
(-)a/include/drm/i915_component.h (+2 lines)
Lines 79-84 struct i915_audio_component_ops { Link Here
79
	 */
79
	 */
80
	int (*get_eld)(struct device *, int port, int pipe, bool *enabled,
80
	int (*get_eld)(struct device *, int port, int pipe, bool *enabled,
81
		       unsigned char *buf, int max_bytes);
81
		       unsigned char *buf, int max_bytes);
82
83
	int (*readmisc)(struct device *);
82
};
84
};
83
85
84
/**
86
/**
(-)a/include/sound/hda_i915.h (+3 lines)
Lines 17-22 int snd_hdac_acomp_get_eld(struct hdac_device *codec, hda_nid_t nid, int dev_id, Link Here
17
int snd_hdac_i915_init(struct hdac_bus *bus);
17
int snd_hdac_i915_init(struct hdac_bus *bus);
18
int snd_hdac_i915_exit(struct hdac_bus *bus);
18
int snd_hdac_i915_exit(struct hdac_bus *bus);
19
int snd_hdac_i915_register_notifier(const struct i915_audio_component_audio_ops *);
19
int snd_hdac_i915_register_notifier(const struct i915_audio_component_audio_ops *);
20
21
int snd_hdac_readmisc(struct hdac_bus *bus);
22
20
#else
23
#else
21
static inline int snd_hdac_set_codec_wakeup(struct hdac_bus *bus, bool enable)
24
static inline int snd_hdac_set_codec_wakeup(struct hdac_bus *bus, bool enable)
22
{
25
{
(-)a/sound/hda/hdac_i915.c (+16 lines)
Lines 59-64 int snd_hdac_set_codec_wakeup(struct hdac_bus *bus, bool enable) Link Here
59
}
59
}
60
EXPORT_SYMBOL_GPL(snd_hdac_set_codec_wakeup);
60
EXPORT_SYMBOL_GPL(snd_hdac_set_codec_wakeup);
61
61
62
int snd_hdac_readmisc(struct hdac_bus *bus)
63
{
64
	struct i915_audio_component *acomp = bus->audio_component;
65
66
	if (!acomp || !acomp->ops)
67
	{
68
		printk("%s %d\n",__func__,__LINE__);
69
		return -ENODEV;
70
	}
71
	acomp->ops->readmisc(acomp->dev);
72
	printk("%s %d\n",__func__,__LINE__);
73
74
	return 0;
75
}
76
EXPORT_SYMBOL_GPL(snd_hdac_readmisc);
77
62
/**
78
/**
63
 * snd_hdac_display_power - Power up / down the power refcount
79
 * snd_hdac_display_power - Power up / down the power refcount
64
 * @bus: HDA core bus
80
 * @bus: HDA core bus
(-)a/sound/pci/hda/hda_controller.c (+3 lines)
Lines 36-41 Link Here
36
#include <sound/core.h>
36
#include <sound/core.h>
37
#include <sound/initval.h>
37
#include <sound/initval.h>
38
#include "hda_controller.h"
38
#include "hda_controller.h"
39
#include <sound/hda_i915.h>
39
40
40
#define CREATE_TRACE_POINTS
41
#define CREATE_TRACE_POINTS
41
#include "hda_controller_trace.h"
42
#include "hda_controller_trace.h"
Lines 1194-1199 static int probe_codec(struct azx *chip, int addr) Link Here
1194
	int err;
1195
	int err;
1195
	unsigned int res = -1;
1196
	unsigned int res = -1;
1196
1197
1198
	snd_hdac_readmisc(bus);
1199
1197
	mutex_lock(&bus->cmd_mutex);
1200
	mutex_lock(&bus->cmd_mutex);
1198
	chip->probing = 1;
1201
	chip->probing = 1;
1199
	azx_send_cmd(bus, cmd);
1202
	azx_send_cmd(bus, cmd);
(-)a/sound/soc/intel/skylake/skl.c (-1 / +4 lines)
Lines 743-748 static int probe_codec(struct hdac_ext_bus *ebus, int addr) Link Here
743
		(AC_VERB_PARAMETERS << 8) | AC_PAR_VENDOR_ID;
743
		(AC_VERB_PARAMETERS << 8) | AC_PAR_VENDOR_ID;
744
	unsigned int res = -1;
744
	unsigned int res = -1;
745
745
746
	printk("%s %d\n",__func__,__LINE__);
747
	snd_hdac_readmisc(bus);
748
746
	mutex_lock(&bus->cmd_mutex);
749
	mutex_lock(&bus->cmd_mutex);
747
	snd_hdac_bus_send_cmd(bus, cmd);
750
	snd_hdac_bus_send_cmd(bus, cmd);
748
	snd_hdac_bus_get_response(bus, addr, &res);
751
	snd_hdac_bus_get_response(bus, addr, &res);
Lines 750-755 static int probe_codec(struct hdac_ext_bus *ebus, int addr) Link Here
750
	if (res == -1)
753
	if (res == -1)
751
		return -EIO;
754
		return -EIO;
752
	dev_dbg(bus->dev, "codec #%d probed OK\n", addr);
755
	dev_dbg(bus->dev, "codec #%d probed OK\n", addr);
756
	printk("%s %d\n",__func__,__LINE__);
753
757
754
	return snd_hdac_ext_bus_device_init(ebus, addr);
758
	return snd_hdac_ext_bus_device_init(ebus, addr);
755
}
759
}
756
- 

Return to bug 197785