aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_codec.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2011-05-02 05:29:30 -0400
committerTakashi Iwai <tiwai@suse.de>2011-05-02 06:07:48 -0400
commitdda144103c4a47a504fcaa8cddd08a4440c87060 (patch)
tree3d6435dbb61e37349153b63326123606d6cd5dba /sound/pci/hda/hda_codec.c
parenta9111321f2fb6a23fbed82b8b4cbd77f5580ba75 (diff)
ALSA: hda - Constify some API function arguments
Also fixed the assignment of multiout.dac_nids to satisfy const. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_codec.c')
-rw-r--r--sound/pci/hda/hda_codec.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index d1a2351aabfa..c63f376ba9ab 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -2621,7 +2621,7 @@ static unsigned int convert_to_spdif_status(unsigned short val)
2621static void set_dig_out(struct hda_codec *codec, hda_nid_t nid, 2621static void set_dig_out(struct hda_codec *codec, hda_nid_t nid,
2622 int verb, int val) 2622 int verb, int val)
2623{ 2623{
2624 hda_nid_t *d; 2624 const hda_nid_t *d;
2625 2625
2626 snd_hda_codec_write_cache(codec, nid, 0, verb, val); 2626 snd_hda_codec_write_cache(codec, nid, 0, verb, val);
2627 d = codec->slave_dig_outs; 2627 d = codec->slave_dig_outs;
@@ -4184,7 +4184,7 @@ static void setup_dig_out_stream(struct hda_codec *codec, hda_nid_t nid,
4184 -1); 4184 -1);
4185 snd_hda_codec_setup_stream(codec, nid, stream_tag, 0, format); 4185 snd_hda_codec_setup_stream(codec, nid, stream_tag, 0, format);
4186 if (codec->slave_dig_outs) { 4186 if (codec->slave_dig_outs) {
4187 hda_nid_t *d; 4187 const hda_nid_t *d;
4188 for (d = codec->slave_dig_outs; *d; d++) 4188 for (d = codec->slave_dig_outs; *d; d++)
4189 snd_hda_codec_setup_stream(codec, *d, stream_tag, 0, 4189 snd_hda_codec_setup_stream(codec, *d, stream_tag, 0,
4190 format); 4190 format);
@@ -4199,7 +4199,7 @@ static void cleanup_dig_out_stream(struct hda_codec *codec, hda_nid_t nid)
4199{ 4199{
4200 snd_hda_codec_cleanup_stream(codec, nid); 4200 snd_hda_codec_cleanup_stream(codec, nid);
4201 if (codec->slave_dig_outs) { 4201 if (codec->slave_dig_outs) {
4202 hda_nid_t *d; 4202 const hda_nid_t *d;
4203 for (d = codec->slave_dig_outs; *d; d++) 4203 for (d = codec->slave_dig_outs; *d; d++)
4204 snd_hda_codec_cleanup_stream(codec, *d); 4204 snd_hda_codec_cleanup_stream(codec, *d);
4205 } 4205 }
@@ -4346,7 +4346,7 @@ int snd_hda_multi_out_analog_prepare(struct hda_codec *codec,
4346 unsigned int format, 4346 unsigned int format,
4347 struct snd_pcm_substream *substream) 4347 struct snd_pcm_substream *substream)
4348{ 4348{
4349 hda_nid_t *nids = mout->dac_nids; 4349 const hda_nid_t *nids = mout->dac_nids;
4350 int chs = substream->runtime->channels; 4350 int chs = substream->runtime->channels;
4351 int i; 4351 int i;
4352 4352
@@ -4401,7 +4401,7 @@ EXPORT_SYMBOL_HDA(snd_hda_multi_out_analog_prepare);
4401int snd_hda_multi_out_analog_cleanup(struct hda_codec *codec, 4401int snd_hda_multi_out_analog_cleanup(struct hda_codec *codec,
4402 struct hda_multi_out *mout) 4402 struct hda_multi_out *mout)
4403{ 4403{
4404 hda_nid_t *nids = mout->dac_nids; 4404 const hda_nid_t *nids = mout->dac_nids;
4405 int i; 4405 int i;
4406 4406
4407 for (i = 0; i < mout->num_dacs; i++) 4407 for (i = 0; i < mout->num_dacs; i++)
@@ -4426,7 +4426,7 @@ EXPORT_SYMBOL_HDA(snd_hda_multi_out_analog_cleanup);
4426 * Helper for automatic pin configuration 4426 * Helper for automatic pin configuration
4427 */ 4427 */
4428 4428
4429static int is_in_nid_list(hda_nid_t nid, hda_nid_t *list) 4429static int is_in_nid_list(hda_nid_t nid, const hda_nid_t *list)
4430{ 4430{
4431 for (; *list; list++) 4431 for (; *list; list++)
4432 if (*list == nid) 4432 if (*list == nid)
@@ -4507,7 +4507,7 @@ static void sort_autocfg_input_pins(struct auto_pin_cfg *cfg)
4507 */ 4507 */
4508int snd_hda_parse_pin_def_config(struct hda_codec *codec, 4508int snd_hda_parse_pin_def_config(struct hda_codec *codec,
4509 struct auto_pin_cfg *cfg, 4509 struct auto_pin_cfg *cfg,
4510 hda_nid_t *ignore_nids) 4510 const hda_nid_t *ignore_nids)
4511{ 4511{
4512 hda_nid_t nid, end_nid; 4512 hda_nid_t nid, end_nid;
4513 short seq, assoc_line_out, assoc_speaker; 4513 short seq, assoc_line_out, assoc_speaker;