[ALSA] oxygen: make SPI configuration configurable

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Thursday, January 31, 2008 - 5:03 pm

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=84aa6b...
Commit:     84aa6b7ba746e6f637444d0e14a9b75c0b49a612
Parent:     31c77643a06313b3a26f4c38c75ceec2a89ad31a
Author:     Clemens Ladisch <clemens@ladisch.de>
AuthorDate: Wed Jan 16 08:28:54 2008 +0100
Committer:  Jaroslav Kysela <perex@perex.cz>
CommitDate: Thu Jan 31 17:29:59 2008 +0100

    [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>
---
 sound/pci/oxygen/oxygen.c     |    2 ++
 sound/pci/oxygen/oxygen.h     |    1 +
 sound/pci/oxygen/oxygen_lib.c |    2 +-
 sound/pci/oxygen/virtuoso.c   |    1 +
 4 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/sound/pci/oxygen/oxygen.c b/sound/pci/oxygen/oxygen.c
index ecc0e6f..83c6fab 100644
--- a/sound/pci/oxygen/oxygen.c
+++ b/sound/pci/oxygen/oxygen.c
@@ -256,6 +256,7 @@ static const struct oxygen_model model_generic = {
 	.update_dac_volume = update_ak4396_volume,
 	.update_dac_mute = update_ak4396_mute,
 	.dac_tlv = ak4396_db_scale,
+	.function_flags = OXYGEN_FUNCTION_ENABLE_SPI_4_5,
 };
 static const struct oxygen_model model_meridian = {
 	.shortname = "C-Media CMI8788",
@@ -270,6 +271,7 @@ static const struct oxygen_model model_meridian = {
 	.update_dac_mute = update_ak4396_mute,
 	.dac_tlv = ak4396_db_scale,
 	.record_from_dma_b = 1,
+	.function_flags = OXYGEN_FUNCTION_ENABLE_SPI_4_5,
 };
 
 static int __devinit generic_oxygen_probe(struct pci_dev *pci,
diff --git a/sound/pci/oxygen/oxygen.h b/sound/pci/oxygen/oxygen.h
index 66dee95..fb9cb36 100644
--- a/sound/pci/oxygen/oxygen.h
+++ b/sound/pci/oxygen/oxygen.h
@@ -83,6 +83,7 @@ struct oxygen_model {
 	u8 record_from_dma_b;
 	u8 cd_in_from_video_in;
 	u8 dac_minimum_volume;
+	u8 function_flags;
 };
 
 /* oxygen_lib.c */
diff --git a/sound/pci/oxygen/oxygen_lib.c b/sound/pci/oxygen/oxygen_lib.c
index ba2bb49..4edf40b 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)
 
 	oxygen_set_bits8(chip, OXYGEN_FUNCTION,
 			 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_A_FORMAT, 0x010a);
 	oxygen_write16(chip, OXYGEN_I2S_B_FORMAT, 0x010a);
diff --git a/sound/pci/oxygen/virtuoso.c b/sound/pci/oxygen/virtuoso.c
index bfd1f3c..247d5e1 100644
--- a/sound/pci/oxygen/virtuoso.c
+++ b/sound/pci/oxygen/virtuoso.c
@@ -227,6 +227,7 @@ static const struct oxygen_model model_xonar = {
 	.record_from_dma_b = 1,
 	.cd_in_from_video_in = 1,
 	.dac_minimum_volume = 15,
+	.function_flags = OXYGEN_FUNCTION_ENABLE_SPI_4_5,
 };
 
 static int __devinit xonar_probe(struct pci_dev *pci,
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[ALSA] oxygen: make SPI configuration configurable, Linux Kernel Mailing ..., (Thu Jan 31, 5:03 pm)