From 568c59e722da22c9b0a485c2f1aaf28cb1b36b79 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Mon, 22 Sep 2008 08:56:01 +0200 Subject: ALSA: oxygen: add probe callback Add a probe callback to the model structure so that model-specific drivers can refine their model detection before the card is initialized. Signed-off-by: Clemens Ladisch --- sound/pci/oxygen/hifier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound/pci/oxygen/hifier.c') diff --git a/sound/pci/oxygen/hifier.c b/sound/pci/oxygen/hifier.c index dad393ae040a..173d6dddc937 100644 --- a/sound/pci/oxygen/hifier.c +++ b/sound/pci/oxygen/hifier.c @@ -180,7 +180,7 @@ static int __devinit hifier_probe(struct pci_dev *pci, ++dev; return -ENOENT; } - err = oxygen_pci_probe(pci, index[dev], id[dev], &model_hifier); + err = oxygen_pci_probe(pci, index[dev], id[dev], &model_hifier, 0); if (err >= 0) ++dev; return err; -- cgit v1.2.3 From d76596b1ee7f5cdbd0b73d374ba72372a2c8b725 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Mon, 22 Sep 2008 09:02:08 +0200 Subject: ALSA: oxygen: rename pcm_dev_cfg Rename the pcm_dev_cfg field to device_config because there will be additional flags that do not describe PCM devices. Signed-off-by: Clemens Ladisch --- sound/pci/oxygen/hifier.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sound/pci/oxygen/hifier.c') diff --git a/sound/pci/oxygen/hifier.c b/sound/pci/oxygen/hifier.c index 173d6dddc937..088939903ee2 100644 --- a/sound/pci/oxygen/hifier.c +++ b/sound/pci/oxygen/hifier.c @@ -157,9 +157,9 @@ static const struct oxygen_model model_hifier = { .update_dac_mute = update_ak4396_mute, .dac_tlv = ak4396_db_scale, .model_data_size = sizeof(struct hifier_data), - .pcm_dev_cfg = PLAYBACK_0_TO_I2S | - PLAYBACK_1_TO_SPDIF | - CAPTURE_0_FROM_I2S_1, + .device_config = PLAYBACK_0_TO_I2S | + PLAYBACK_1_TO_SPDIF | + CAPTURE_0_FROM_I2S_1, .dac_channels = 2, .dac_volume_min = 0, .dac_volume_max = 255, -- cgit v1.2.3 From c2bc4ff58d7aabcf1fc96134200d685d796ae425 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Mon, 22 Sep 2008 09:05:29 +0200 Subject: ALSA: oxygen: add self-documenting functions Introduce some trivial functions to better document the relationships of the various model callbacks. Signed-off-by: Clemens Ladisch --- sound/pci/oxygen/hifier.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'sound/pci/oxygen/hifier.c') diff --git a/sound/pci/oxygen/hifier.c b/sound/pci/oxygen/hifier.c index 088939903ee2..1ab833f843eb 100644 --- a/sound/pci/oxygen/hifier.c +++ b/sound/pci/oxygen/hifier.c @@ -94,6 +94,11 @@ static void hifier_cleanup(struct oxygen *chip) { } +static void hifier_resume(struct oxygen *chip) +{ + hifier_registers_init(chip); +} + static void set_ak4396_params(struct oxygen *chip, struct snd_pcm_hw_params *params) { @@ -150,7 +155,7 @@ static const struct oxygen_model model_hifier = { .init = hifier_init, .control_filter = hifier_control_filter, .cleanup = hifier_cleanup, - .resume = hifier_registers_init, + .resume = hifier_resume, .set_dac_params = set_ak4396_params, .set_adc_params = set_cs5340_params, .update_dac_volume = update_ak4396_volume, -- cgit v1.2.3