diff options
Diffstat (limited to 'sound/pci/echoaudio/gina24_dsp.c')
-rw-r--r-- | sound/pci/echoaudio/gina24_dsp.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/sound/pci/echoaudio/gina24_dsp.c b/sound/pci/echoaudio/gina24_dsp.c index 2fef37a2a5b9..98f7cfa81b5f 100644 --- a/sound/pci/echoaudio/gina24_dsp.c +++ b/sound/pci/echoaudio/gina24_dsp.c | |||
@@ -33,8 +33,7 @@ static int write_control_reg(struct echoaudio *chip, u32 value, char force); | |||
33 | static int set_input_clock(struct echoaudio *chip, u16 clock); | 33 | static int set_input_clock(struct echoaudio *chip, u16 clock); |
34 | static int set_professional_spdif(struct echoaudio *chip, char prof); | 34 | static int set_professional_spdif(struct echoaudio *chip, char prof); |
35 | static int set_digital_mode(struct echoaudio *chip, u8 mode); | 35 | static int set_digital_mode(struct echoaudio *chip, u8 mode); |
36 | static int load_asic_generic(struct echoaudio *chip, u32 cmd, | 36 | static int load_asic_generic(struct echoaudio *chip, u32 cmd, short asic); |
37 | const struct firmware *asic); | ||
38 | static int check_asic_status(struct echoaudio *chip); | 37 | static int check_asic_status(struct echoaudio *chip); |
39 | 38 | ||
40 | 39 | ||
@@ -58,19 +57,16 @@ static int init_hw(struct echoaudio *chip, u16 device_id, u16 subdevice_id) | |||
58 | ECHO_CLOCK_BIT_INTERNAL | ECHO_CLOCK_BIT_SPDIF | | 57 | ECHO_CLOCK_BIT_INTERNAL | ECHO_CLOCK_BIT_SPDIF | |
59 | ECHO_CLOCK_BIT_ESYNC | ECHO_CLOCK_BIT_ESYNC96 | | 58 | ECHO_CLOCK_BIT_ESYNC | ECHO_CLOCK_BIT_ESYNC96 | |
60 | ECHO_CLOCK_BIT_ADAT; | 59 | ECHO_CLOCK_BIT_ADAT; |
61 | chip->professional_spdif = FALSE; | ||
62 | chip->digital_in_automute = TRUE; | ||
63 | chip->digital_mode = DIGITAL_MODE_SPDIF_RCA; | ||
64 | 60 | ||
65 | /* Gina24 comes in both '301 and '361 flavors */ | 61 | /* Gina24 comes in both '301 and '361 flavors */ |
66 | if (chip->device_id == DEVICE_ID_56361) { | 62 | if (chip->device_id == DEVICE_ID_56361) { |
67 | chip->dsp_code_to_load = &card_fw[FW_GINA24_361_DSP]; | 63 | chip->dsp_code_to_load = FW_GINA24_361_DSP; |
68 | chip->digital_modes = | 64 | chip->digital_modes = |
69 | ECHOCAPS_HAS_DIGITAL_MODE_SPDIF_RCA | | 65 | ECHOCAPS_HAS_DIGITAL_MODE_SPDIF_RCA | |
70 | ECHOCAPS_HAS_DIGITAL_MODE_SPDIF_OPTICAL | | 66 | ECHOCAPS_HAS_DIGITAL_MODE_SPDIF_OPTICAL | |
71 | ECHOCAPS_HAS_DIGITAL_MODE_ADAT; | 67 | ECHOCAPS_HAS_DIGITAL_MODE_ADAT; |
72 | } else { | 68 | } else { |
73 | chip->dsp_code_to_load = &card_fw[FW_GINA24_301_DSP]; | 69 | chip->dsp_code_to_load = FW_GINA24_301_DSP; |
74 | chip->digital_modes = | 70 | chip->digital_modes = |
75 | ECHOCAPS_HAS_DIGITAL_MODE_SPDIF_RCA | | 71 | ECHOCAPS_HAS_DIGITAL_MODE_SPDIF_RCA | |
76 | ECHOCAPS_HAS_DIGITAL_MODE_SPDIF_OPTICAL | | 72 | ECHOCAPS_HAS_DIGITAL_MODE_SPDIF_OPTICAL | |
@@ -82,19 +78,22 @@ static int init_hw(struct echoaudio *chip, u16 device_id, u16 subdevice_id) | |||
82 | return err; | 78 | return err; |
83 | chip->bad_board = FALSE; | 79 | chip->bad_board = FALSE; |
84 | 80 | ||
85 | if ((err = init_line_levels(chip)) < 0) | ||
86 | return err; | ||
87 | err = set_digital_mode(chip, DIGITAL_MODE_SPDIF_RCA); | ||
88 | if (err < 0) | ||
89 | return err; | ||
90 | err = set_professional_spdif(chip, TRUE); | ||
91 | |||
92 | DE_INIT(("init_hw done\n")); | 81 | DE_INIT(("init_hw done\n")); |
93 | return err; | 82 | return err; |
94 | } | 83 | } |
95 | 84 | ||
96 | 85 | ||
97 | 86 | ||
87 | static int set_mixer_defaults(struct echoaudio *chip) | ||
88 | { | ||
89 | chip->digital_mode = DIGITAL_MODE_SPDIF_RCA; | ||
90 | chip->professional_spdif = FALSE; | ||
91 | chip->digital_in_automute = TRUE; | ||
92 | return init_line_levels(chip); | ||
93 | } | ||
94 | |||
95 | |||
96 | |||
98 | static u32 detect_input_clocks(const struct echoaudio *chip) | 97 | static u32 detect_input_clocks(const struct echoaudio *chip) |
99 | { | 98 | { |
100 | u32 clocks_from_dsp, clock_bits; | 99 | u32 clocks_from_dsp, clock_bits; |
@@ -125,7 +124,7 @@ static int load_asic(struct echoaudio *chip) | |||
125 | { | 124 | { |
126 | u32 control_reg; | 125 | u32 control_reg; |
127 | int err; | 126 | int err; |
128 | const struct firmware *fw; | 127 | short asic; |
129 | 128 | ||
130 | if (chip->asic_loaded) | 129 | if (chip->asic_loaded) |
131 | return 1; | 130 | return 1; |
@@ -135,14 +134,15 @@ static int load_asic(struct echoaudio *chip) | |||
135 | 134 | ||
136 | /* Pick the correct ASIC for '301 or '361 Gina24 */ | 135 | /* Pick the correct ASIC for '301 or '361 Gina24 */ |
137 | if (chip->device_id == DEVICE_ID_56361) | 136 | if (chip->device_id == DEVICE_ID_56361) |
138 | fw = &card_fw[FW_GINA24_361_ASIC]; | 137 | asic = FW_GINA24_361_ASIC; |
139 | else | 138 | else |
140 | fw = &card_fw[FW_GINA24_301_ASIC]; | 139 | asic = FW_GINA24_301_ASIC; |
141 | 140 | ||
142 | if ((err = load_asic_generic(chip, DSP_FNC_LOAD_GINA24_ASIC, fw)) < 0) | 141 | err = load_asic_generic(chip, DSP_FNC_LOAD_GINA24_ASIC, asic); |
142 | if (err < 0) | ||
143 | return err; | 143 | return err; |
144 | 144 | ||
145 | chip->asic_code = fw; | 145 | chip->asic_code = asic; |
146 | 146 | ||
147 | /* Now give the new ASIC a little time to set up */ | 147 | /* Now give the new ASIC a little time to set up */ |
148 | mdelay(10); | 148 | mdelay(10); |