Commit 84aa6b7b authored by Clemens Ladisch's avatar Clemens Ladisch Committed by Jaroslav Kysela

[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: default avatarClemens Ladisch <clemens@ladisch.de>
Signed-off-by: default avatarJaroslav Kysela <perex@perex.cz>
parent 31c77643
...@@ -256,6 +256,7 @@ static const struct oxygen_model model_generic = { ...@@ -256,6 +256,7 @@ static const struct oxygen_model model_generic = {
.update_dac_volume = update_ak4396_volume, .update_dac_volume = update_ak4396_volume,
.update_dac_mute = update_ak4396_mute, .update_dac_mute = update_ak4396_mute,
.dac_tlv = ak4396_db_scale, .dac_tlv = ak4396_db_scale,
.function_flags = OXYGEN_FUNCTION_ENABLE_SPI_4_5,
}; };
static const struct oxygen_model model_meridian = { static const struct oxygen_model model_meridian = {
.shortname = "C-Media CMI8788", .shortname = "C-Media CMI8788",
...@@ -270,6 +271,7 @@ static const struct oxygen_model model_meridian = { ...@@ -270,6 +271,7 @@ static const struct oxygen_model model_meridian = {
.update_dac_mute = update_ak4396_mute, .update_dac_mute = update_ak4396_mute,
.dac_tlv = ak4396_db_scale, .dac_tlv = ak4396_db_scale,
.record_from_dma_b = 1, .record_from_dma_b = 1,
.function_flags = OXYGEN_FUNCTION_ENABLE_SPI_4_5,
}; };
static int __devinit generic_oxygen_probe(struct pci_dev *pci, static int __devinit generic_oxygen_probe(struct pci_dev *pci,
......
...@@ -83,6 +83,7 @@ struct oxygen_model { ...@@ -83,6 +83,7 @@ struct oxygen_model {
u8 record_from_dma_b; u8 record_from_dma_b;
u8 cd_in_from_video_in; u8 cd_in_from_video_in;
u8 dac_minimum_volume; u8 dac_minimum_volume;
u8 function_flags;
}; };
/* oxygen_lib.c */ /* oxygen_lib.c */
......
...@@ -202,7 +202,7 @@ static void __devinit oxygen_init(struct oxygen *chip) ...@@ -202,7 +202,7 @@ static void __devinit oxygen_init(struct oxygen *chip)
oxygen_set_bits8(chip, OXYGEN_FUNCTION, oxygen_set_bits8(chip, OXYGEN_FUNCTION,
OXYGEN_FUNCTION_RESET_CODEC | OXYGEN_FUNCTION_RESET_CODEC |
OXYGEN_FUNCTION_ENABLE_SPI_4_5); chip->model->function_flags);
oxygen_write16(chip, OXYGEN_I2S_MULTICH_FORMAT, 0x010a); oxygen_write16(chip, OXYGEN_I2S_MULTICH_FORMAT, 0x010a);
oxygen_write16(chip, OXYGEN_I2S_A_FORMAT, 0x010a); oxygen_write16(chip, OXYGEN_I2S_A_FORMAT, 0x010a);
oxygen_write16(chip, OXYGEN_I2S_B_FORMAT, 0x010a); oxygen_write16(chip, OXYGEN_I2S_B_FORMAT, 0x010a);
......
...@@ -227,6 +227,7 @@ static const struct oxygen_model model_xonar = { ...@@ -227,6 +227,7 @@ static const struct oxygen_model model_xonar = {
.record_from_dma_b = 1, .record_from_dma_b = 1,
.cd_in_from_video_in = 1, .cd_in_from_video_in = 1,
.dac_minimum_volume = 15, .dac_minimum_volume = 15,
.function_flags = OXYGEN_FUNCTION_ENABLE_SPI_4_5,
}; };
static int __devinit xonar_probe(struct pci_dev *pci, static int __devinit xonar_probe(struct pci_dev *pci,
......
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