diff options
-rw-r--r-- | sound/pci/hda/patch_hdmi.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index f6a97607e522..7bd89bf62559 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c | |||
@@ -2818,6 +2818,10 @@ static int patch_nvhdmi_8ch_7x(struct hda_codec *codec) | |||
2818 | #define ATI_VERB_GET_MULTICHANNEL_7 0xf88 | 2818 | #define ATI_VERB_GET_MULTICHANNEL_7 0xf88 |
2819 | #define ATI_VERB_GET_MULTICHANNEL_MODE 0xf89 | 2819 | #define ATI_VERB_GET_MULTICHANNEL_MODE 0xf89 |
2820 | 2820 | ||
2821 | /* AMD specific HDA cvt verbs */ | ||
2822 | #define ATI_VERB_SET_RAMP_RATE 0x770 | ||
2823 | #define ATI_VERB_GET_RAMP_RATE 0xf70 | ||
2824 | |||
2821 | #define ATI_OUT_ENABLE 0x1 | 2825 | #define ATI_OUT_ENABLE 0x1 |
2822 | 2826 | ||
2823 | #define ATI_MULTICHANNEL_MODE_PAIRED 0 | 2827 | #define ATI_MULTICHANNEL_MODE_PAIRED 0 |
@@ -3049,6 +3053,23 @@ static int atihdmi_pin_hbr_setup(struct hda_codec *codec, hda_nid_t pin_nid, | |||
3049 | return 0; | 3053 | return 0; |
3050 | } | 3054 | } |
3051 | 3055 | ||
3056 | static int atihdmi_setup_stream(struct hda_codec *codec, hda_nid_t cvt_nid, | ||
3057 | hda_nid_t pin_nid, u32 stream_tag, int format) | ||
3058 | { | ||
3059 | |||
3060 | if (is_amdhdmi_rev3_or_later(codec)) { | ||
3061 | int ramp_rate = 180; /* default as per AMD spec */ | ||
3062 | /* disable ramp-up/down for non-pcm as per AMD spec */ | ||
3063 | if (format & AC_FMT_TYPE_NON_PCM) | ||
3064 | ramp_rate = 0; | ||
3065 | |||
3066 | snd_hda_codec_write(codec, cvt_nid, 0, ATI_VERB_SET_RAMP_RATE, ramp_rate); | ||
3067 | } | ||
3068 | |||
3069 | return hdmi_setup_stream(codec, cvt_nid, pin_nid, stream_tag, format); | ||
3070 | } | ||
3071 | |||
3072 | |||
3052 | static int atihdmi_init(struct hda_codec *codec) | 3073 | static int atihdmi_init(struct hda_codec *codec) |
3053 | { | 3074 | { |
3054 | struct hdmi_spec *spec = codec->spec; | 3075 | struct hdmi_spec *spec = codec->spec; |
@@ -3095,6 +3116,7 @@ static int patch_atihdmi(struct hda_codec *codec) | |||
3095 | spec->ops.pin_set_slot_channel = atihdmi_pin_set_slot_channel; | 3116 | spec->ops.pin_set_slot_channel = atihdmi_pin_set_slot_channel; |
3096 | spec->ops.pin_setup_infoframe = atihdmi_pin_setup_infoframe; | 3117 | spec->ops.pin_setup_infoframe = atihdmi_pin_setup_infoframe; |
3097 | spec->ops.pin_hbr_setup = atihdmi_pin_hbr_setup; | 3118 | spec->ops.pin_hbr_setup = atihdmi_pin_hbr_setup; |
3119 | spec->ops.setup_stream = atihdmi_setup_stream; | ||
3098 | 3120 | ||
3099 | if (!has_amd_full_remap_support(codec)) { | 3121 | if (!has_amd_full_remap_support(codec)) { |
3100 | /* override to ATI/AMD-specific versions with pairwise mapping */ | 3122 | /* override to ATI/AMD-specific versions with pairwise mapping */ |