aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/echoaudio/indigoio_dsp.c
diff options
context:
space:
mode:
authorGiuliano Pochini <pochini@shiny.it>2010-02-14 12:15:59 -0500
committerTakashi Iwai <tiwai@suse.de>2010-02-15 04:39:22 -0500
commitad3499f4668f684ef6e5d0222ae14d5e4ade1fdd (patch)
tree6c4599e78d3f29df5cd17b8d2006f69f006acea3 /sound/pci/echoaudio/indigoio_dsp.c
parent4f8ada444cc7a7ea70cdc81f098b34c5f1f2df41 (diff)
ALSA: Echoaudio - Add suspend support #1
Move the controls init code outside the init_hw() function because is must not be called during resume. This patch moves the code that initializes the card's controls with default valued from the init_hw() function into a separated set_mixer_defaults() function (one for each of the 16 supported cards). This change is necessary because during resume we must resurrect the hardware without losing the previous settings. set_mixer_defaults() must be called only once when the module is loaded. Signed-off-by: Giuliano Pochini <pochini@shiny.it> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/echoaudio/indigoio_dsp.c')
-rw-r--r--sound/pci/echoaudio/indigoio_dsp.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sound/pci/echoaudio/indigoio_dsp.c b/sound/pci/echoaudio/indigoio_dsp.c
index 134e783d3486..beb9a5b69892 100644
--- a/sound/pci/echoaudio/indigoio_dsp.c
+++ b/sound/pci/echoaudio/indigoio_dsp.c
@@ -60,15 +60,19 @@ static int init_hw(struct echoaudio *chip, u16 device_id, u16 subdevice_id)
60 return err; 60 return err;
61 chip->bad_board = FALSE; 61 chip->bad_board = FALSE;
62 62
63 if ((err = init_line_levels(chip)) < 0)
64 return err;
65
66 DE_INIT(("init_hw done\n")); 63 DE_INIT(("init_hw done\n"));
67 return err; 64 return err;
68} 65}
69 66
70 67
71 68
69static int set_mixer_defaults(struct echoaudio *chip)
70{
71 return init_line_levels(chip);
72}
73
74
75
72static u32 detect_input_clocks(const struct echoaudio *chip) 76static u32 detect_input_clocks(const struct echoaudio *chip)
73{ 77{
74 return ECHO_CLOCK_BIT_INTERNAL; 78 return ECHO_CLOCK_BIT_INTERNAL;