Loading sound/pci/hda/hda_codec.h +4 −0 Original line number Diff line number Diff line Loading @@ -784,6 +784,10 @@ struct hda_codec { int power_count; /* current (global) power refcount */ struct delayed_work power_work; /* delayed task for powerdown */ #endif /* codec-specific additional proc output */ void (*proc_widget_hook)(struct snd_info_buffer *buffer, struct hda_codec *codec, hda_nid_t nid); }; /* direction */ Loading sound/pci/hda/hda_proc.c +2 −14 Original line number Diff line number Diff line Loading @@ -414,17 +414,6 @@ static void print_conn_list(struct snd_info_buffer *buffer, } } static void print_realtek_coef(struct snd_info_buffer *buffer, struct hda_codec *codec, hda_nid_t nid) { int coeff = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_PROC_COEF, 0); snd_iprintf(buffer, " Processing Coefficient: 0x%02x\n", coeff); coeff = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_COEF_INDEX, 0); snd_iprintf(buffer, " Coefficient Index: 0x%02x\n", coeff); } static void print_gpio(struct snd_info_buffer *buffer, struct hda_codec *codec, hda_nid_t nid) { Loading Loading @@ -606,9 +595,8 @@ static void print_codec_info(struct snd_info_entry *entry, if (wid_caps & AC_WCAP_PROC_WID) print_proc_caps(buffer, codec, nid); /* NID 0x20 == Realtek Define Registers */ if (codec->vendor_id == 0x10ec && nid == 0x20) print_realtek_coef(buffer, codec, nid); if (codec->proc_widget_hook) codec->proc_widget_hook(buffer, codec, nid); } snd_hda_power_down(codec); } Loading sound/pci/hda/patch_realtek.c +32 −0 Original line number Diff line number Diff line Loading @@ -766,6 +766,27 @@ static void add_verb(struct alc_spec *spec, const struct hda_verb *verb) spec->init_verbs[spec->num_init_verbs++] = verb; } #ifdef CONFIG_PROC_FS /* * hook for proc */ static void print_realtek_coef(struct snd_info_buffer *buffer, struct hda_codec *codec, hda_nid_t nid) { int coeff; if (nid != 0x20) return; coeff = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_PROC_COEF, 0); snd_iprintf(buffer, " Processing Coefficient: 0x%02x\n", coeff); coeff = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_COEF_INDEX, 0); snd_iprintf(buffer, " Coefficient Index: 0x%02x\n", coeff); } #else #define print_realtek_coef NULL #endif /* * set up from the preset table */ Loading Loading @@ -4344,6 +4365,7 @@ static int patch_alc880(struct hda_codec *codec) if (!spec->loopback.amplist) spec->loopback.amplist = alc880_loopbacks; #endif codec->proc_widget_hook = print_realtek_coef; return 0; } Loading Loading @@ -5869,6 +5891,7 @@ static int patch_alc260(struct hda_codec *codec) if (!spec->loopback.amplist) spec->loopback.amplist = alc260_loopbacks; #endif codec->proc_widget_hook = print_realtek_coef; return 0; } Loading Loading @@ -7074,6 +7097,7 @@ static int patch_alc882(struct hda_codec *codec) if (!spec->loopback.amplist) spec->loopback.amplist = alc882_loopbacks; #endif codec->proc_widget_hook = print_realtek_coef; return 0; } Loading Loading @@ -9042,6 +9066,7 @@ static int patch_alc883(struct hda_codec *codec) if (!spec->loopback.amplist) spec->loopback.amplist = alc883_loopbacks; #endif codec->proc_widget_hook = print_realtek_coef; return 0; } Loading Loading @@ -10848,6 +10873,7 @@ static int patch_alc262(struct hda_codec *codec) if (!spec->loopback.amplist) spec->loopback.amplist = alc262_loopbacks; #endif codec->proc_widget_hook = print_realtek_coef; return 0; } Loading Loading @@ -11913,6 +11939,8 @@ static int patch_alc268(struct hda_codec *codec) if (board_config == ALC268_AUTO) spec->init_hook = alc268_auto_init; codec->proc_widget_hook = print_realtek_coef; return 0; } Loading Loading @@ -12714,6 +12742,7 @@ static int patch_alc269(struct hda_codec *codec) if (!spec->loopback.amplist) spec->loopback.amplist = alc269_loopbacks; #endif codec->proc_widget_hook = print_realtek_coef; return 0; } Loading Loading @@ -13802,6 +13831,7 @@ static int patch_alc861(struct hda_codec *codec) if (!spec->loopback.amplist) spec->loopback.amplist = alc861_loopbacks; #endif codec->proc_widget_hook = print_realtek_coef; return 0; } Loading Loading @@ -14763,6 +14793,7 @@ static int patch_alc861vd(struct hda_codec *codec) if (!spec->loopback.amplist) spec->loopback.amplist = alc861vd_loopbacks; #endif codec->proc_widget_hook = print_realtek_coef; return 0; } Loading Loading @@ -16572,6 +16603,7 @@ static int patch_alc662(struct hda_codec *codec) if (!spec->loopback.amplist) spec->loopback.amplist = alc662_loopbacks; #endif codec->proc_widget_hook = print_realtek_coef; return 0; } Loading
sound/pci/hda/hda_codec.h +4 −0 Original line number Diff line number Diff line Loading @@ -784,6 +784,10 @@ struct hda_codec { int power_count; /* current (global) power refcount */ struct delayed_work power_work; /* delayed task for powerdown */ #endif /* codec-specific additional proc output */ void (*proc_widget_hook)(struct snd_info_buffer *buffer, struct hda_codec *codec, hda_nid_t nid); }; /* direction */ Loading
sound/pci/hda/hda_proc.c +2 −14 Original line number Diff line number Diff line Loading @@ -414,17 +414,6 @@ static void print_conn_list(struct snd_info_buffer *buffer, } } static void print_realtek_coef(struct snd_info_buffer *buffer, struct hda_codec *codec, hda_nid_t nid) { int coeff = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_PROC_COEF, 0); snd_iprintf(buffer, " Processing Coefficient: 0x%02x\n", coeff); coeff = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_COEF_INDEX, 0); snd_iprintf(buffer, " Coefficient Index: 0x%02x\n", coeff); } static void print_gpio(struct snd_info_buffer *buffer, struct hda_codec *codec, hda_nid_t nid) { Loading Loading @@ -606,9 +595,8 @@ static void print_codec_info(struct snd_info_entry *entry, if (wid_caps & AC_WCAP_PROC_WID) print_proc_caps(buffer, codec, nid); /* NID 0x20 == Realtek Define Registers */ if (codec->vendor_id == 0x10ec && nid == 0x20) print_realtek_coef(buffer, codec, nid); if (codec->proc_widget_hook) codec->proc_widget_hook(buffer, codec, nid); } snd_hda_power_down(codec); } Loading
sound/pci/hda/patch_realtek.c +32 −0 Original line number Diff line number Diff line Loading @@ -766,6 +766,27 @@ static void add_verb(struct alc_spec *spec, const struct hda_verb *verb) spec->init_verbs[spec->num_init_verbs++] = verb; } #ifdef CONFIG_PROC_FS /* * hook for proc */ static void print_realtek_coef(struct snd_info_buffer *buffer, struct hda_codec *codec, hda_nid_t nid) { int coeff; if (nid != 0x20) return; coeff = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_PROC_COEF, 0); snd_iprintf(buffer, " Processing Coefficient: 0x%02x\n", coeff); coeff = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_COEF_INDEX, 0); snd_iprintf(buffer, " Coefficient Index: 0x%02x\n", coeff); } #else #define print_realtek_coef NULL #endif /* * set up from the preset table */ Loading Loading @@ -4344,6 +4365,7 @@ static int patch_alc880(struct hda_codec *codec) if (!spec->loopback.amplist) spec->loopback.amplist = alc880_loopbacks; #endif codec->proc_widget_hook = print_realtek_coef; return 0; } Loading Loading @@ -5869,6 +5891,7 @@ static int patch_alc260(struct hda_codec *codec) if (!spec->loopback.amplist) spec->loopback.amplist = alc260_loopbacks; #endif codec->proc_widget_hook = print_realtek_coef; return 0; } Loading Loading @@ -7074,6 +7097,7 @@ static int patch_alc882(struct hda_codec *codec) if (!spec->loopback.amplist) spec->loopback.amplist = alc882_loopbacks; #endif codec->proc_widget_hook = print_realtek_coef; return 0; } Loading Loading @@ -9042,6 +9066,7 @@ static int patch_alc883(struct hda_codec *codec) if (!spec->loopback.amplist) spec->loopback.amplist = alc883_loopbacks; #endif codec->proc_widget_hook = print_realtek_coef; return 0; } Loading Loading @@ -10848,6 +10873,7 @@ static int patch_alc262(struct hda_codec *codec) if (!spec->loopback.amplist) spec->loopback.amplist = alc262_loopbacks; #endif codec->proc_widget_hook = print_realtek_coef; return 0; } Loading Loading @@ -11913,6 +11939,8 @@ static int patch_alc268(struct hda_codec *codec) if (board_config == ALC268_AUTO) spec->init_hook = alc268_auto_init; codec->proc_widget_hook = print_realtek_coef; return 0; } Loading Loading @@ -12714,6 +12742,7 @@ static int patch_alc269(struct hda_codec *codec) if (!spec->loopback.amplist) spec->loopback.amplist = alc269_loopbacks; #endif codec->proc_widget_hook = print_realtek_coef; return 0; } Loading Loading @@ -13802,6 +13831,7 @@ static int patch_alc861(struct hda_codec *codec) if (!spec->loopback.amplist) spec->loopback.amplist = alc861_loopbacks; #endif codec->proc_widget_hook = print_realtek_coef; return 0; } Loading Loading @@ -14763,6 +14793,7 @@ static int patch_alc861vd(struct hda_codec *codec) if (!spec->loopback.amplist) spec->loopback.amplist = alc861vd_loopbacks; #endif codec->proc_widget_hook = print_realtek_coef; return 0; } Loading Loading @@ -16572,6 +16603,7 @@ static int patch_alc662(struct hda_codec *codec) if (!spec->loopback.amplist) spec->loopback.amplist = alc662_loopbacks; #endif codec->proc_widget_hook = print_realtek_coef; return 0; }