aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2008-01-16 02:28:54 -0500
committerJaroslav Kysela <perex@perex.cz>2008-01-31 11:29:59 -0500
commit84aa6b7ba746e6f637444d0e14a9b75c0b49a612 (patch)
tree39cfa1399116aa6ecf67d458b315b624f6c48825
parent31c77643a06313b3a26f4c38c75ceec2a89ad31a (diff)
[ALSA] oxygen: make SPI configuration configurable
Add a field to the model structure so that it is possible to have a card where the SPI outputs 4 and 5 are used for an EEPROM. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
-rw-r--r--sound/pci/oxygen/oxygen.c2
-rw-r--r--sound/pci/oxygen/oxygen.h1
-rw-r--r--sound/pci/oxygen/oxygen_lib.c2
-rw-r--r--sound/pci/oxygen/virtuoso.c1
4 files changed, 5 insertions, 1 deletions
diff --git a/sound/pci/oxygen/oxygen.c b/sound/pci/oxygen/oxygen.c
index ecc0e6f9d277..83c6fab425fe 100644
--- a/sound/pci/oxygen/oxygen.c
+++ b/sound/pci/oxygen/oxygen.c
@@ -256,6 +256,7 @@ static const struct oxygen_model model_generic = {
256 .update_dac_volume = update_ak4396_volume, 256 .update_dac_volume = update_ak4396_volume,
257 .update_dac_mute = update_ak4396_mute, 257 .update_dac_mute = update_ak4396_mute,
258 .dac_tlv = ak4396_db_scale, 258 .dac_tlv = ak4396_db_scale,
259 .function_flags = OXYGEN_FUNCTION_ENABLE_SPI_4_5,
259}; 260};
260static const struct oxygen_model model_meridian = { 261static const struct oxygen_model model_meridian = {
261 .shortname = "C-Media CMI8788", 262 .shortname = "C-Media CMI8788",
@@ -270,6 +271,7 @@ static const struct oxygen_model model_meridian = {
270 .update_dac_mute = update_ak4396_mute, 271 .update_dac_mute = update_ak4396_mute,
271 .dac_tlv = ak4396_db_scale, 272 .dac_tlv = ak4396_db_scale,
272 .record_from_dma_b = 1, 273 .record_from_dma_b = 1,
274 .function_flags = OXYGEN_FUNCTION_ENABLE_SPI_4_5,
273}; 275};
274 276
275static int __devinit generic_oxygen_probe(struct pci_dev *pci, 277static int __devinit generic_oxygen_probe(struct pci_dev *pci,
diff --git a/sound/pci/oxygen/oxygen.h b/sound/pci/oxygen/oxygen.h
index 66dee9504340..fb9cb36b87b1 100644
--- a/sound/pci/oxygen/oxygen.h
+++ b/sound/pci/oxygen/oxygen.h
@@ -83,6 +83,7 @@ struct oxygen_model {
83 u8 record_from_dma_b; 83 u8 record_from_dma_b;
84 u8 cd_in_from_video_in; 84 u8 cd_in_from_video_in;
85 u8 dac_minimum_volume; 85 u8 dac_minimum_volume;
86 u8 function_flags;
86}; 87};
87 88
88/* oxygen_lib.c */ 89/* oxygen_lib.c */
diff --git a/sound/pci/oxygen/oxygen_lib.c b/sound/pci/oxygen/oxygen_lib.c
index ba2bb4995d1e..4edf40b65ae1 100644
--- a/sound/pci/oxygen/oxygen_lib.c
+++ b/sound/pci/oxygen/oxygen_lib.c
@@ -202,7 +202,7 @@ static void __devinit oxygen_init(struct oxygen *chip)
202 202
203 oxygen_set_bits8(chip, OXYGEN_FUNCTION, 203 oxygen_set_bits8(chip, OXYGEN_FUNCTION,
204 OXYGEN_FUNCTION_RESET_CODEC | 204 OXYGEN_FUNCTION_RESET_CODEC |
205 OXYGEN_FUNCTION_ENABLE_SPI_4_5); 205 chip->model->function_flags);
206 oxygen_write16(chip, OXYGEN_I2S_MULTICH_FORMAT, 0x010a); 206 oxygen_write16(chip, OXYGEN_I2S_MULTICH_FORMAT, 0x010a);
207 oxygen_write16(chip, OXYGEN_I2S_A_FORMAT, 0x010a); 207 oxygen_write16(chip, OXYGEN_I2S_A_FORMAT, 0x010a);
208 oxygen_write16(chip, OXYGEN_I2S_B_FORMAT, 0x010a); 208 oxygen_write16(chip, OXYGEN_I2S_B_FORMAT, 0x010a);
diff --git a/sound/pci/oxygen/virtuoso.c b/sound/pci/oxygen/virtuoso.c
index bfd1f3c3dfcd..247d5e1ccb68 100644
--- a/sound/pci/oxygen/virtuoso.c
+++ b/sound/pci/oxygen/virtuoso.c
@@ -227,6 +227,7 @@ static const struct oxygen_model model_xonar = {
227 .record_from_dma_b = 1, 227 .record_from_dma_b = 1,
228 .cd_in_from_video_in = 1, 228 .cd_in_from_video_in = 1,
229 .dac_minimum_volume = 15, 229 .dac_minimum_volume = 15,
230 .function_flags = OXYGEN_FUNCTION_ENABLE_SPI_4_5,
230}; 231};
231 232
232static int __devinit xonar_probe(struct pci_dev *pci, 233static int __devinit xonar_probe(struct pci_dev *pci,