Skip to content

Commit

Permalink
[ALSA] Add support for Sony Vaio AR 11B
Browse files Browse the repository at this point in the history
This patch adds automatic detection for Sigmatel ID 7664,
the sound chip in Sony Vaio AR 11B (european name).
- patch_stac7661 becomes patch_stac766x
- .id = 0x83847664 is added

Signed-off-by: Guillaume Munch <diabo@free.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
  • Loading branch information
Guillaume Munch authored and Jaroslav Kysela committed Sep 23, 2006
1 parent d244bf8 commit 99ccc56
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 16 deletions.
6 changes: 3 additions & 3 deletions Documentation/sound/alsa/ALSA-Configuration.txt
Original file line number Diff line number Diff line change
Expand Up @@ -856,10 +856,10 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
3stack-dig ditto with SPDIF
laptop 3-jack with hp-jack automute
laptop-dig ditto with SPDIF
auto auto-confgi reading BIOS (default)
auto auto-config reading BIOS (default)

STAC7661(?)
vaio Setup for VAIO FE550G/SZ110
STAC7664/7661(?)
vaio Setup for VAIO FE550G/SZ110/AR11B

If the default configuration doesn't work and one of the above
matches with your device, report it together with the PCI
Expand Down
29 changes: 16 additions & 13 deletions sound/pci/hda/patch_sigmatel.c
Original file line number Diff line number Diff line change
Expand Up @@ -1449,10 +1449,10 @@ static int patch_stac9205(struct hda_codec *codec)
}

/*
* STAC 7661(?) hack
* STAC 7661(?) and 7664 hack
*/

/* static config for Sony VAIO FE550G */
/* static config for Sony VAIO FE550G and Sony VAIO AR */
static hda_nid_t vaio_dacs[] = { 0x2 };
#define VAIO_HP_DAC 0x5
static hda_nid_t vaio_adcs[] = { 0x8 /*,0x6*/ };
Expand Down Expand Up @@ -1552,7 +1552,7 @@ static struct snd_kcontrol_new vaio_mixer[] = {
{}
};

static struct hda_codec_ops stac7661_patch_ops = {
static struct hda_codec_ops stac766x_patch_ops = {
.build_controls = stac92xx_build_controls,
.build_pcms = stac92xx_build_pcms,
.init = stac92xx_init,
Expand All @@ -1562,23 +1562,25 @@ static struct hda_codec_ops stac7661_patch_ops = {
#endif
};

enum { STAC7661_VAIO };
enum { STAC766x_VAIO };

static struct hda_board_config stac7661_cfg_tbl[] = {
{ .modelname = "vaio", .config = STAC7661_VAIO },
static struct hda_board_config stac766x_cfg_tbl[] = {
{ .modelname = "vaio", .config = STAC766x_VAIO },
{ .pci_subvendor = 0x104d, .pci_subdevice = 0x81e6,
.config = STAC7661_VAIO },
.config = STAC766x_VAIO },
{ .pci_subvendor = 0x104d, .pci_subdevice = 0x81ef,
.config = STAC7661_VAIO },
.config = STAC766x_VAIO },
{ .pci_subvendor = 0x104d, .pci_subdevice = 0x81fd,
.config = STAC766x_VAIO },
{}
};

static int patch_stac7661(struct hda_codec *codec)
static int patch_stac766x(struct hda_codec *codec)
{
struct sigmatel_spec *spec;
int board_config;

board_config = snd_hda_check_board_config(codec, stac7661_cfg_tbl);
board_config = snd_hda_check_board_config(codec, stac766x_cfg_tbl);
if (board_config < 0)
/* unknown config, let generic-parser do its job... */
return snd_hda_parse_generic_codec(codec);
Expand All @@ -1589,7 +1591,7 @@ static int patch_stac7661(struct hda_codec *codec)

codec->spec = spec;
switch (board_config) {
case STAC7661_VAIO:
case STAC766x_VAIO:
spec->mixer = vaio_mixer;
spec->init = vaio_init;
spec->multiout.max_channels = 2;
Expand All @@ -1603,7 +1605,7 @@ static int patch_stac7661(struct hda_codec *codec)
break;
}

codec->patch_ops = stac7661_patch_ops;
codec->patch_ops = stac766x_patch_ops;
return 0;
}

Expand Down Expand Up @@ -1635,7 +1637,7 @@ struct hda_codec_preset snd_hda_preset_sigmatel[] = {
{ .id = 0x83847627, .name = "STAC9271D", .patch = patch_stac927x },
{ .id = 0x83847628, .name = "STAC9274X5NH", .patch = patch_stac927x },
{ .id = 0x83847629, .name = "STAC9274D5NH", .patch = patch_stac927x },
{ .id = 0x83847661, .name = "STAC7661", .patch = patch_stac7661 },
{ .id = 0x83847661, .name = "STAC7661", .patch = patch_stac766x },
{ .id = 0x838476a0, .name = "STAC9205", .patch = patch_stac9205 },
{ .id = 0x838476a1, .name = "STAC9205D", .patch = patch_stac9205 },
{ .id = 0x838476a2, .name = "STAC9204", .patch = patch_stac9205 },
Expand All @@ -1644,5 +1646,6 @@ struct hda_codec_preset snd_hda_preset_sigmatel[] = {
{ .id = 0x838476a5, .name = "STAC9255D", .patch = patch_stac9205 },
{ .id = 0x838476a6, .name = "STAC9254", .patch = patch_stac9205 },
{ .id = 0x838476a7, .name = "STAC9254D", .patch = patch_stac9205 },
{ .id = 0x83847664, .name = "STAC7664", .patch = patch_stac766x },
{} /* terminator */
};

0 comments on commit 99ccc56

Please sign in to comment.