Commit 04f9890d authored by Clemens Ladisch's avatar Clemens Ladisch Committed by Takashi Iwai

sound: virtuoso: add Xonar Essence ST support

Add support for the Asus Xonar Essence ST and its daughterboard.
Signed-off-by: default avatarClemens Ladisch <clemens@ladisch.de>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent b990ae96
...@@ -1859,7 +1859,8 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. ...@@ -1859,7 +1859,8 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
------------------- -------------------
Module for sound cards based on the Asus AV100/AV200 chips, Module for sound cards based on the Asus AV100/AV200 chips,
i.e., Xonar D1, DX, D2, D2X, HDAV1.3 (Deluxe), and Essence STX. i.e., Xonar D1, DX, D2, D2X, HDAV1.3 (Deluxe), Essence ST
(Deluxe) and Essence STX.
This module supports autoprobe and multiple cards. This module supports autoprobe and multiple cards.
......
...@@ -764,8 +764,8 @@ config SND_VIRTUOSO ...@@ -764,8 +764,8 @@ config SND_VIRTUOSO
select SND_OXYGEN_LIB select SND_OXYGEN_LIB
help help
Say Y here to include support for sound cards based on the Say Y here to include support for sound cards based on the
Asus AV100/AV200 chips, i.e., Xonar D1, DX, D2, D2X, and Asus AV100/AV200 chips, i.e., Xonar D1, DX, D2, D2X,
Essence STX. Essence ST (Deluxe), and Essence STX.
Support for the HDAV1.3 (Deluxe) is very experimental. Support for the HDAV1.3 (Deluxe) is very experimental.
To compile this driver as a module, choose M here: the module To compile this driver as a module, choose M here: the module
......
...@@ -113,8 +113,8 @@ ...@@ -113,8 +113,8 @@
*/ */
/* /*
* Xonar Essence STX * Xonar Essence ST (Deluxe)/STX
* ----------------- * -----------------------------
* *
* CMI8788: * CMI8788:
* *
...@@ -180,6 +180,8 @@ enum { ...@@ -180,6 +180,8 @@ enum {
MODEL_DX, MODEL_DX,
MODEL_HDAV, /* without daughterboard */ MODEL_HDAV, /* without daughterboard */
MODEL_HDAV_H6, /* with H6 daughterboard */ MODEL_HDAV_H6, /* with H6 daughterboard */
MODEL_ST,
MODEL_ST_H6,
MODEL_STX, MODEL_STX,
}; };
...@@ -191,6 +193,7 @@ static struct pci_device_id xonar_ids[] __devinitdata = { ...@@ -191,6 +193,7 @@ static struct pci_device_id xonar_ids[] __devinitdata = {
{ OXYGEN_PCI_SUBID(0x1043, 0x8327), .driver_data = MODEL_DX }, { OXYGEN_PCI_SUBID(0x1043, 0x8327), .driver_data = MODEL_DX },
{ OXYGEN_PCI_SUBID(0x1043, 0x834f), .driver_data = MODEL_D1 }, { OXYGEN_PCI_SUBID(0x1043, 0x834f), .driver_data = MODEL_D1 },
{ OXYGEN_PCI_SUBID(0x1043, 0x835c), .driver_data = MODEL_STX }, { OXYGEN_PCI_SUBID(0x1043, 0x835c), .driver_data = MODEL_STX },
{ OXYGEN_PCI_SUBID(0x1043, 0x835d), .driver_data = MODEL_ST },
{ OXYGEN_PCI_SUBID_BROKEN_EEPROM }, { OXYGEN_PCI_SUBID_BROKEN_EEPROM },
{ } { }
}; };
...@@ -211,9 +214,9 @@ MODULE_DEVICE_TABLE(pci, xonar_ids); ...@@ -211,9 +214,9 @@ MODULE_DEVICE_TABLE(pci, xonar_ids);
#define GPIO_DX_FRONT_PANEL 0x0002 #define GPIO_DX_FRONT_PANEL 0x0002
#define GPIO_DX_INPUT_ROUTE 0x0100 #define GPIO_DX_INPUT_ROUTE 0x0100
#define GPIO_HDAV_DB_MASK 0x0030 #define GPIO_DB_MASK 0x0030
#define GPIO_HDAV_DB_H6 0x0000 #define GPIO_DB_H6 0x0000
#define GPIO_HDAV_DB_XX 0x0020 #define GPIO_DB_XX 0x0020
#define GPIO_ST_HP_REAR 0x0002 #define GPIO_ST_HP_REAR 0x0002
#define GPIO_ST_HP 0x0080 #define GPIO_ST_HP 0x0080
...@@ -531,7 +534,7 @@ static void xonar_hdav_init(struct oxygen *chip) ...@@ -531,7 +534,7 @@ static void xonar_hdav_init(struct oxygen *chip)
snd_component_add(chip->card, "CS5381"); snd_component_add(chip->card, "CS5381");
} }
static void xonar_stx_init(struct oxygen *chip) static void xonar_st_init(struct oxygen *chip)
{ {
struct xonar_data *data = chip->model_data; struct xonar_data *data = chip->model_data;
...@@ -540,12 +543,11 @@ static void xonar_stx_init(struct oxygen *chip) ...@@ -540,12 +543,11 @@ static void xonar_stx_init(struct oxygen *chip)
OXYGEN_2WIRE_INTERRUPT_MASK | OXYGEN_2WIRE_INTERRUPT_MASK |
OXYGEN_2WIRE_SPEED_FAST); OXYGEN_2WIRE_SPEED_FAST);
if (chip->model.private_data == MODEL_ST_H6)
chip->model.dac_channels = 8;
data->anti_pop_delay = 100; data->anti_pop_delay = 100;
data->dacs = 1; data->dacs = chip->model.private_data == MODEL_ST_H6 ? 4 : 1;
data->output_enable_bit = GPIO_DX_OUTPUT_ENABLE; data->output_enable_bit = GPIO_DX_OUTPUT_ENABLE;
data->ext_power_reg = OXYGEN_GPI_DATA;
data->ext_power_int_reg = OXYGEN_GPI_INTERRUPT_MASK;
data->ext_power_bit = GPI_DX_EXT_POWER;
data->pcm1796_oversampling = PCM1796_OS_64; data->pcm1796_oversampling = PCM1796_OS_64;
pcm1796_init(chip); pcm1796_init(chip);
...@@ -561,6 +563,17 @@ static void xonar_stx_init(struct oxygen *chip) ...@@ -561,6 +563,17 @@ static void xonar_stx_init(struct oxygen *chip)
snd_component_add(chip->card, "CS5381"); snd_component_add(chip->card, "CS5381");
} }
static void xonar_stx_init(struct oxygen *chip)
{
struct xonar_data *data = chip->model_data;
data->ext_power_reg = OXYGEN_GPI_DATA;
data->ext_power_int_reg = OXYGEN_GPI_INTERRUPT_MASK;
data->ext_power_bit = GPI_DX_EXT_POWER;
xonar_st_init(chip);
}
static void xonar_disable_output(struct oxygen *chip) static void xonar_disable_output(struct oxygen *chip)
{ {
struct xonar_data *data = chip->model_data; struct xonar_data *data = chip->model_data;
...@@ -1036,7 +1049,7 @@ static const struct oxygen_model model_xonar_hdav = { ...@@ -1036,7 +1049,7 @@ static const struct oxygen_model model_xonar_hdav = {
static const struct oxygen_model model_xonar_st = { static const struct oxygen_model model_xonar_st = {
.longname = "Asus Virtuoso 100", .longname = "Asus Virtuoso 100",
.chip = "AV200", .chip = "AV200",
.init = xonar_stx_init, .init = xonar_st_init,
.control_filter = xonar_st_control_filter, .control_filter = xonar_st_control_filter,
.mixer_init = xonar_st_mixer_init, .mixer_init = xonar_st_mixer_init,
.cleanup = xonar_st_cleanup, .cleanup = xonar_st_cleanup,
...@@ -1069,6 +1082,7 @@ static int __devinit get_xonar_model(struct oxygen *chip, ...@@ -1069,6 +1082,7 @@ static int __devinit get_xonar_model(struct oxygen *chip,
[MODEL_D2] = &model_xonar_d2, [MODEL_D2] = &model_xonar_d2,
[MODEL_D2X] = &model_xonar_d2, [MODEL_D2X] = &model_xonar_d2,
[MODEL_HDAV] = &model_xonar_hdav, [MODEL_HDAV] = &model_xonar_hdav,
[MODEL_ST] = &model_xonar_st,
[MODEL_STX] = &model_xonar_st, [MODEL_STX] = &model_xonar_st,
}; };
static const char *const names[] = { static const char *const names[] = {
...@@ -1078,6 +1092,8 @@ static int __devinit get_xonar_model(struct oxygen *chip, ...@@ -1078,6 +1092,8 @@ static int __devinit get_xonar_model(struct oxygen *chip,
[MODEL_D2X] = "Xonar D2X", [MODEL_D2X] = "Xonar D2X",
[MODEL_HDAV] = "Xonar HDAV1.3", [MODEL_HDAV] = "Xonar HDAV1.3",
[MODEL_HDAV_H6] = "Xonar HDAV1.3+H6", [MODEL_HDAV_H6] = "Xonar HDAV1.3+H6",
[MODEL_ST] = "Xonar Essence ST",
[MODEL_ST_H6] = "Xonar Essence ST+H6",
[MODEL_STX] = "Xonar Essence STX", [MODEL_STX] = "Xonar Essence STX",
}; };
unsigned int model = id->driver_data; unsigned int model = id->driver_data;
...@@ -1094,21 +1110,27 @@ static int __devinit get_xonar_model(struct oxygen *chip, ...@@ -1094,21 +1110,27 @@ static int __devinit get_xonar_model(struct oxygen *chip,
chip->model.init = xonar_dx_init; chip->model.init = xonar_dx_init;
break; break;
case MODEL_HDAV: case MODEL_HDAV:
oxygen_clear_bits16(chip, OXYGEN_GPIO_CONTROL, oxygen_clear_bits16(chip, OXYGEN_GPIO_CONTROL, GPIO_DB_MASK);
GPIO_HDAV_DB_MASK); switch (oxygen_read16(chip, OXYGEN_GPIO_DATA) & GPIO_DB_MASK) {
switch (oxygen_read16(chip, OXYGEN_GPIO_DATA) & case GPIO_DB_H6:
GPIO_HDAV_DB_MASK) {
case GPIO_HDAV_DB_H6:
model = MODEL_HDAV_H6; model = MODEL_HDAV_H6;
break; break;
case GPIO_HDAV_DB_XX: case GPIO_DB_XX:
snd_printk(KERN_ERR "unknown daughterboard\n"); snd_printk(KERN_ERR "unknown daughterboard\n");
return -ENODEV; return -ENODEV;
} }
break; break;
case MODEL_ST:
oxygen_clear_bits16(chip, OXYGEN_GPIO_CONTROL, GPIO_DB_MASK);
switch (oxygen_read16(chip, OXYGEN_GPIO_DATA) & GPIO_DB_MASK) {
case GPIO_DB_H6:
model = MODEL_ST_H6;
break;
}
break;
case MODEL_STX: case MODEL_STX:
oxygen_clear_bits16(chip, OXYGEN_GPIO_CONTROL, chip->model.init = xonar_stx_init;
GPIO_HDAV_DB_MASK); oxygen_clear_bits16(chip, OXYGEN_GPIO_CONTROL, GPIO_DB_MASK);
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment