Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 120523
b: refs/heads/master
c: 0640f84
h: refs/heads/master
i:
  120521: 9894029
  120519: 3f7ec45
v: v3
  • Loading branch information
Takashi Iwai committed Dec 3, 2008
1 parent 4d8c703 commit 604b497
Show file tree
Hide file tree
Showing 8 changed files with 111 additions and 79 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ff7a3267368634e368ebaac68d5e3abf129edd1d
refs/heads/master: 0640f84fac8a8aa8e7911c950cd9a4b0199711f6
1 change: 0 additions & 1 deletion trunk/sound/pci/hda/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ config SND_HDA_GENERIC

config SND_HDA_POWER_SAVE
bool "Aggressive power-saving on HD-audio"
depends on EXPERIMENTAL
help
Say Y here to enable more aggressive power-saving mode on
HD-audio driver. The power-saving timeout can be configured
Expand Down
1 change: 1 addition & 0 deletions trunk/sound/pci/hda/hda_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1282,6 +1282,7 @@ void snd_hda_codec_reset(struct hda_codec *codec)
}
if (codec->patch_ops.free)
codec->patch_ops.free(codec);
codec->proc_widget_hook = NULL;
codec->spec = NULL;
free_hda_cache(&codec->amp_cache);
free_hda_cache(&codec->cmd_cache);
Expand Down
6 changes: 4 additions & 2 deletions trunk/sound/pci/hda/hda_codec.h
Original file line number Diff line number Diff line change
Expand Up @@ -615,8 +615,6 @@ struct hda_bus {
/* unsolicited event queue */
struct hda_bus_unsolicited *unsol;

struct snd_info_entry *proc;

/* assigned PCMs */
DECLARE_BITMAP(pcm_dev_bits, SNDRV_PCM_DEVICES);

Expand Down Expand Up @@ -795,6 +793,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 */
Expand Down
2 changes: 1 addition & 1 deletion trunk/sound/pci/hda/hda_intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -1233,12 +1233,12 @@ static int __devinit azx_codec_create(struct azx *chip, const char *model,
memset(&bus_temp, 0, sizeof(bus_temp));
bus_temp.private_data = chip;
bus_temp.modelname = model;
bus_temp.power_save = &power_save;
bus_temp.pci = chip->pci;
bus_temp.ops.command = azx_send_cmd;
bus_temp.ops.get_response = azx_get_response;
bus_temp.ops.attach_pcm = azx_attach_pcm_stream;
#ifdef CONFIG_SND_HDA_POWER_SAVE
bus_temp.power_save = &power_save;
bus_temp.ops.pm_notify = azx_power_notify;
#endif

Expand Down
18 changes: 4 additions & 14 deletions trunk/sound/pci/hda/hda_proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -504,6 +493,8 @@ static void print_codec_info(struct snd_info_entry *entry,
}

print_gpio(buffer, codec, codec->afg);
if (codec->proc_widget_hook)
codec->proc_widget_hook(buffer, codec, codec->afg);

for (i = 0; i < nodes; i++, nid++) {
unsigned int wid_caps =
Expand Down Expand Up @@ -606,9 +597,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);
}
Expand Down
34 changes: 34 additions & 0 deletions trunk/sound/pci/hda/patch_realtek.c
Original file line number Diff line number Diff line change
Expand Up @@ -765,6 +765,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
*/
Expand Down Expand Up @@ -4343,6 +4364,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;
}
Expand Down Expand Up @@ -5868,6 +5890,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;
}
Expand Down Expand Up @@ -7073,6 +7096,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;
}
Expand Down Expand Up @@ -9041,6 +9065,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;
}
Expand Down Expand Up @@ -10533,6 +10558,8 @@ static struct snd_pci_quirk alc262_cfg_tbl[] = {
SND_PCI_QUIRK(0x104d, 0x820f, "Sony ASSAMD", ALC262_SONY_ASSAMD),
SND_PCI_QUIRK(0x104d, 0x900e, "Sony ASSAMD", ALC262_SONY_ASSAMD),
SND_PCI_QUIRK(0x104d, 0x9015, "Sony 0x9015", ALC262_SONY_ASSAMD),
SND_PCI_QUIRK(0x104d, 0x9033, "Sony VAIO VGN-SR19XN",
ALC262_SONY_ASSAMD),
SND_PCI_QUIRK(0x1179, 0x0001, "Toshiba dynabook SS RX1",
ALC262_TOSHIBA_RX1),
SND_PCI_QUIRK(0x1179, 0xff7b, "Toshiba S06", ALC262_TOSHIBA_S06),
Expand Down Expand Up @@ -10847,6 +10874,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;
}
Expand Down Expand Up @@ -11912,6 +11940,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;
}

Expand Down Expand Up @@ -12713,6 +12743,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;
}
Expand Down Expand Up @@ -13801,6 +13832,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;
}
Expand Down Expand Up @@ -14762,6 +14794,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;
}
Expand Down Expand Up @@ -16571,6 +16604,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;
}
Expand Down
Loading

0 comments on commit 604b497

Please sign in to comment.