aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-06-10 01:26:39 -0400
committerTakashi Iwai <tiwai@suse.de>2009-06-10 01:26:39 -0400
commit9dea75c70965c240012251dc5845fe0c1a061180 (patch)
treed4779c1392bb8aa800f0e3cb12af9161e8f217db
parent8c3ff3a7fb9730564554bb65d54455e6ce8ad340 (diff)
parent04f9890df1bad2115665b7027e664aaffa44088d (diff)
Merge branch 'topic/oxygen' into for-linus
* topic/oxygen: sound: virtuoso: add Xonar Essence ST support sound: virtuoso: enable HDAV S/PDIF input sound: virtuoso: add another DX PCI ID sound: oxygen: reset DMA when stream is closed
-rw-r--r--Documentation/sound/alsa/ALSA-Configuration.txt3
-rw-r--r--sound/pci/Kconfig4
-rw-r--r--sound/pci/oxygen/oxygen_pcm.c6
-rw-r--r--sound/pci/oxygen/virtuoso.c64
4 files changed, 53 insertions, 24 deletions
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt
index 945de361022f..096af12a0afa 100644
--- a/Documentation/sound/alsa/ALSA-Configuration.txt
+++ b/Documentation/sound/alsa/ALSA-Configuration.txt
@@ -1886,7 +1886,8 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
1886 ------------------- 1886 -------------------
1887 1887
1888 Module for sound cards based on the Asus AV100/AV200 chips, 1888 Module for sound cards based on the Asus AV100/AV200 chips,
1889 i.e., Xonar D1, DX, D2, D2X, HDAV1.3 (Deluxe), and Essence STX. 1889 i.e., Xonar D1, DX, D2, D2X, HDAV1.3 (Deluxe), Essence ST
1890 (Deluxe) and Essence STX.
1890 1891
1891 This module supports autoprobe and multiple cards. 1892 This module supports autoprobe and multiple cards.
1892 1893
diff --git a/sound/pci/Kconfig b/sound/pci/Kconfig
index b306bb457a41..748f6b7d90b7 100644
--- a/sound/pci/Kconfig
+++ b/sound/pci/Kconfig
@@ -787,8 +787,8 @@ config SND_VIRTUOSO
787 select SND_OXYGEN_LIB 787 select SND_OXYGEN_LIB
788 help 788 help
789 Say Y here to include support for sound cards based on the 789 Say Y here to include support for sound cards based on the
790 Asus AV100/AV200 chips, i.e., Xonar D1, DX, D2, D2X, and 790 Asus AV100/AV200 chips, i.e., Xonar D1, DX, D2, D2X,
791 Essence STX. 791 Essence ST (Deluxe), and Essence STX.
792 Support for the HDAV1.3 (Deluxe) is very experimental. 792 Support for the HDAV1.3 (Deluxe) is very experimental.
793 793
794 To compile this driver as a module, choose M here: the module 794 To compile this driver as a module, choose M here: the module
diff --git a/sound/pci/oxygen/oxygen_pcm.c b/sound/pci/oxygen/oxygen_pcm.c
index c262049961e1..3b5ca70c9d4d 100644
--- a/sound/pci/oxygen/oxygen_pcm.c
+++ b/sound/pci/oxygen/oxygen_pcm.c
@@ -487,10 +487,14 @@ static int oxygen_hw_free(struct snd_pcm_substream *substream)
487{ 487{
488 struct oxygen *chip = snd_pcm_substream_chip(substream); 488 struct oxygen *chip = snd_pcm_substream_chip(substream);
489 unsigned int channel = oxygen_substream_channel(substream); 489 unsigned int channel = oxygen_substream_channel(substream);
490 unsigned int channel_mask = 1 << channel;
490 491
491 spin_lock_irq(&chip->reg_lock); 492 spin_lock_irq(&chip->reg_lock);
492 chip->interrupt_mask &= ~(1 << channel); 493 chip->interrupt_mask &= ~channel_mask;
493 oxygen_write16(chip, OXYGEN_INTERRUPT_MASK, chip->interrupt_mask); 494 oxygen_write16(chip, OXYGEN_INTERRUPT_MASK, chip->interrupt_mask);
495
496 oxygen_set_bits8(chip, OXYGEN_DMA_FLUSH, channel_mask);
497 oxygen_clear_bits8(chip, OXYGEN_DMA_FLUSH, channel_mask);
494 spin_unlock_irq(&chip->reg_lock); 498 spin_unlock_irq(&chip->reg_lock);
495 499
496 return snd_pcm_lib_free_pages(substream); 500 return snd_pcm_lib_free_pages(substream);
diff --git a/sound/pci/oxygen/virtuoso.c b/sound/pci/oxygen/virtuoso.c
index bc5ce11c8b14..bf971f7cfdc6 100644
--- a/sound/pci/oxygen/virtuoso.c
+++ b/sound/pci/oxygen/virtuoso.c
@@ -113,8 +113,8 @@
113 */ 113 */
114 114
115/* 115/*
116 * Xonar Essence STX 116 * Xonar Essence ST (Deluxe)/STX
117 * ----------------- 117 * -----------------------------
118 * 118 *
119 * CMI8788: 119 * CMI8788:
120 * 120 *
@@ -180,6 +180,8 @@ enum {
180 MODEL_DX, 180 MODEL_DX,
181 MODEL_HDAV, /* without daughterboard */ 181 MODEL_HDAV, /* without daughterboard */
182 MODEL_HDAV_H6, /* with H6 daughterboard */ 182 MODEL_HDAV_H6, /* with H6 daughterboard */
183 MODEL_ST,
184 MODEL_ST_H6,
183 MODEL_STX, 185 MODEL_STX,
184}; 186};
185 187
@@ -188,8 +190,10 @@ static struct pci_device_id xonar_ids[] __devinitdata = {
188 { OXYGEN_PCI_SUBID(0x1043, 0x8275), .driver_data = MODEL_DX }, 190 { OXYGEN_PCI_SUBID(0x1043, 0x8275), .driver_data = MODEL_DX },
189 { OXYGEN_PCI_SUBID(0x1043, 0x82b7), .driver_data = MODEL_D2X }, 191 { OXYGEN_PCI_SUBID(0x1043, 0x82b7), .driver_data = MODEL_D2X },
190 { OXYGEN_PCI_SUBID(0x1043, 0x8314), .driver_data = MODEL_HDAV }, 192 { OXYGEN_PCI_SUBID(0x1043, 0x8314), .driver_data = MODEL_HDAV },
193 { OXYGEN_PCI_SUBID(0x1043, 0x8327), .driver_data = MODEL_DX },
191 { OXYGEN_PCI_SUBID(0x1043, 0x834f), .driver_data = MODEL_D1 }, 194 { OXYGEN_PCI_SUBID(0x1043, 0x834f), .driver_data = MODEL_D1 },
192 { OXYGEN_PCI_SUBID(0x1043, 0x835c), .driver_data = MODEL_STX }, 195 { OXYGEN_PCI_SUBID(0x1043, 0x835c), .driver_data = MODEL_STX },
196 { OXYGEN_PCI_SUBID(0x1043, 0x835d), .driver_data = MODEL_ST },
193 { OXYGEN_PCI_SUBID_BROKEN_EEPROM }, 197 { OXYGEN_PCI_SUBID_BROKEN_EEPROM },
194 { } 198 { }
195}; 199};
@@ -210,9 +214,9 @@ MODULE_DEVICE_TABLE(pci, xonar_ids);
210#define GPIO_DX_FRONT_PANEL 0x0002 214#define GPIO_DX_FRONT_PANEL 0x0002
211#define GPIO_DX_INPUT_ROUTE 0x0100 215#define GPIO_DX_INPUT_ROUTE 0x0100
212 216
213#define GPIO_HDAV_DB_MASK 0x0030 217#define GPIO_DB_MASK 0x0030
214#define GPIO_HDAV_DB_H6 0x0000 218#define GPIO_DB_H6 0x0000
215#define GPIO_HDAV_DB_XX 0x0020 219#define GPIO_DB_XX 0x0020
216 220
217#define GPIO_ST_HP_REAR 0x0002 221#define GPIO_ST_HP_REAR 0x0002
218#define GPIO_ST_HP 0x0080 222#define GPIO_ST_HP 0x0080
@@ -530,7 +534,7 @@ static void xonar_hdav_init(struct oxygen *chip)
530 snd_component_add(chip->card, "CS5381"); 534 snd_component_add(chip->card, "CS5381");
531} 535}
532 536
533static void xonar_stx_init(struct oxygen *chip) 537static void xonar_st_init(struct oxygen *chip)
534{ 538{
535 struct xonar_data *data = chip->model_data; 539 struct xonar_data *data = chip->model_data;
536 540
@@ -539,12 +543,11 @@ static void xonar_stx_init(struct oxygen *chip)
539 OXYGEN_2WIRE_INTERRUPT_MASK | 543 OXYGEN_2WIRE_INTERRUPT_MASK |
540 OXYGEN_2WIRE_SPEED_FAST); 544 OXYGEN_2WIRE_SPEED_FAST);
541 545
546 if (chip->model.private_data == MODEL_ST_H6)
547 chip->model.dac_channels = 8;
542 data->anti_pop_delay = 100; 548 data->anti_pop_delay = 100;
543 data->dacs = 1; 549 data->dacs = chip->model.private_data == MODEL_ST_H6 ? 4 : 1;
544 data->output_enable_bit = GPIO_DX_OUTPUT_ENABLE; 550 data->output_enable_bit = GPIO_DX_OUTPUT_ENABLE;
545 data->ext_power_reg = OXYGEN_GPI_DATA;
546 data->ext_power_int_reg = OXYGEN_GPI_INTERRUPT_MASK;
547 data->ext_power_bit = GPI_DX_EXT_POWER;
548 data->pcm1796_oversampling = PCM1796_OS_64; 551 data->pcm1796_oversampling = PCM1796_OS_64;
549 552
550 pcm1796_init(chip); 553 pcm1796_init(chip);
@@ -560,6 +563,17 @@ static void xonar_stx_init(struct oxygen *chip)
560 snd_component_add(chip->card, "CS5381"); 563 snd_component_add(chip->card, "CS5381");
561} 564}
562 565
566static void xonar_stx_init(struct oxygen *chip)
567{
568 struct xonar_data *data = chip->model_data;
569
570 data->ext_power_reg = OXYGEN_GPI_DATA;
571 data->ext_power_int_reg = OXYGEN_GPI_INTERRUPT_MASK;
572 data->ext_power_bit = GPI_DX_EXT_POWER;
573
574 xonar_st_init(chip);
575}
576
563static void xonar_disable_output(struct oxygen *chip) 577static void xonar_disable_output(struct oxygen *chip)
564{ 578{
565 struct xonar_data *data = chip->model_data; 579 struct xonar_data *data = chip->model_data;
@@ -1021,7 +1035,8 @@ static const struct oxygen_model model_xonar_hdav = {
1021 .model_data_size = sizeof(struct xonar_data), 1035 .model_data_size = sizeof(struct xonar_data),
1022 .device_config = PLAYBACK_0_TO_I2S | 1036 .device_config = PLAYBACK_0_TO_I2S |
1023 PLAYBACK_1_TO_SPDIF | 1037 PLAYBACK_1_TO_SPDIF |
1024 CAPTURE_0_FROM_I2S_2, 1038 CAPTURE_0_FROM_I2S_2 |
1039 CAPTURE_1_FROM_SPDIF,
1025 .dac_channels = 8, 1040 .dac_channels = 8,
1026 .dac_volume_min = 255 - 2*60, 1041 .dac_volume_min = 255 - 2*60,
1027 .dac_volume_max = 255, 1042 .dac_volume_max = 255,
@@ -1034,7 +1049,7 @@ static const struct oxygen_model model_xonar_hdav = {
1034static const struct oxygen_model model_xonar_st = { 1049static const struct oxygen_model model_xonar_st = {
1035 .longname = "Asus Virtuoso 100", 1050 .longname = "Asus Virtuoso 100",
1036 .chip = "AV200", 1051 .chip = "AV200",
1037 .init = xonar_stx_init, 1052 .init = xonar_st_init,
1038 .control_filter = xonar_st_control_filter, 1053 .control_filter = xonar_st_control_filter,
1039 .mixer_init = xonar_st_mixer_init, 1054 .mixer_init = xonar_st_mixer_init,
1040 .cleanup = xonar_st_cleanup, 1055 .cleanup = xonar_st_cleanup,
@@ -1067,6 +1082,7 @@ static int __devinit get_xonar_model(struct oxygen *chip,
1067 [MODEL_D2] = &model_xonar_d2, 1082 [MODEL_D2] = &model_xonar_d2,
1068 [MODEL_D2X] = &model_xonar_d2, 1083 [MODEL_D2X] = &model_xonar_d2,
1069 [MODEL_HDAV] = &model_xonar_hdav, 1084 [MODEL_HDAV] = &model_xonar_hdav,
1085 [MODEL_ST] = &model_xonar_st,
1070 [MODEL_STX] = &model_xonar_st, 1086 [MODEL_STX] = &model_xonar_st,
1071 }; 1087 };
1072 static const char *const names[] = { 1088 static const char *const names[] = {
@@ -1076,6 +1092,8 @@ static int __devinit get_xonar_model(struct oxygen *chip,
1076 [MODEL_D2X] = "Xonar D2X", 1092 [MODEL_D2X] = "Xonar D2X",
1077 [MODEL_HDAV] = "Xonar HDAV1.3", 1093 [MODEL_HDAV] = "Xonar HDAV1.3",
1078 [MODEL_HDAV_H6] = "Xonar HDAV1.3+H6", 1094 [MODEL_HDAV_H6] = "Xonar HDAV1.3+H6",
1095 [MODEL_ST] = "Xonar Essence ST",
1096 [MODEL_ST_H6] = "Xonar Essence ST+H6",
1079 [MODEL_STX] = "Xonar Essence STX", 1097 [MODEL_STX] = "Xonar Essence STX",
1080 }; 1098 };
1081 unsigned int model = id->driver_data; 1099 unsigned int model = id->driver_data;
@@ -1092,21 +1110,27 @@ static int __devinit get_xonar_model(struct oxygen *chip,
1092 chip->model.init = xonar_dx_init; 1110 chip->model.init = xonar_dx_init;
1093 break; 1111 break;
1094 case MODEL_HDAV: 1112 case MODEL_HDAV:
1095 oxygen_clear_bits16(chip, OXYGEN_GPIO_CONTROL, 1113 oxygen_clear_bits16(chip, OXYGEN_GPIO_CONTROL, GPIO_DB_MASK);
1096 GPIO_HDAV_DB_MASK); 1114 switch (oxygen_read16(chip, OXYGEN_GPIO_DATA) & GPIO_DB_MASK) {
1097 switch (oxygen_read16(chip, OXYGEN_GPIO_DATA) & 1115 case GPIO_DB_H6:
1098 GPIO_HDAV_DB_MASK) {
1099 case GPIO_HDAV_DB_H6:
1100 model = MODEL_HDAV_H6; 1116 model = MODEL_HDAV_H6;
1101 break; 1117 break;
1102 case GPIO_HDAV_DB_XX: 1118 case GPIO_DB_XX:
1103 snd_printk(KERN_ERR "unknown daughterboard\n"); 1119 snd_printk(KERN_ERR "unknown daughterboard\n");
1104 return -ENODEV; 1120 return -ENODEV;
1105 } 1121 }
1106 break; 1122 break;
1123 case MODEL_ST:
1124 oxygen_clear_bits16(chip, OXYGEN_GPIO_CONTROL, GPIO_DB_MASK);
1125 switch (oxygen_read16(chip, OXYGEN_GPIO_DATA) & GPIO_DB_MASK) {
1126 case GPIO_DB_H6:
1127 model = MODEL_ST_H6;
1128 break;
1129 }
1130 break;
1107 case MODEL_STX: 1131 case MODEL_STX:
1108 oxygen_clear_bits16(chip, OXYGEN_GPIO_CONTROL, 1132 chip->model.init = xonar_stx_init;
1109 GPIO_HDAV_DB_MASK); 1133 oxygen_clear_bits16(chip, OXYGEN_GPIO_CONTROL, GPIO_DB_MASK);
1110 break; 1134 break;
1111 } 1135 }
1112 1136