Skip to content

Commit

Permalink
ALSA: echoaudio - replace uses of __constant_{endian}
Browse files Browse the repository at this point in the history
The base versions handle constant folding now.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Harvey Harrison authored and Takashi Iwai committed Feb 11, 2009
1 parent a85165c commit e930e99
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion sound/pci/echoaudio/echo3g_dsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ static int init_hw(struct echoaudio *chip, u16 device_id, u16 subdevice_id)
}

chip->comm_page->e3g_frq_register =
__constant_cpu_to_le32((E3G_MAGIC_NUMBER / 48000) - 2);
cpu_to_le32((E3G_MAGIC_NUMBER / 48000) - 2);
chip->device_id = device_id;
chip->subdevice_id = subdevice_id;
chip->bad_board = TRUE;
Expand Down
3 changes: 1 addition & 2 deletions sound/pci/echoaudio/echoaudio_3g.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ static int check_asic_status(struct echoaudio *chip)
if (wait_handshake(chip))
return -EIO;

chip->comm_page->ext_box_status =
__constant_cpu_to_le32(E3G_ASIC_NOT_LOADED);
chip->comm_page->ext_box_status = cpu_to_le32(E3G_ASIC_NOT_LOADED);
chip->asic_loaded = FALSE;
clear_handshake(chip);
send_vector(chip, DSP_VC_TEST_ASIC);
Expand Down
6 changes: 3 additions & 3 deletions sound/pci/echoaudio/echoaudio_dsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -926,11 +926,11 @@ static int init_dsp_comm_page(struct echoaudio *chip)

/* Init the comm page */
chip->comm_page->comm_size =
__constant_cpu_to_le32(sizeof(struct comm_page));
cpu_to_le32(sizeof(struct comm_page));
chip->comm_page->handshake = 0xffffffff;
chip->comm_page->midi_out_free_count =
__constant_cpu_to_le32(DSP_MIDI_OUT_FIFO_SIZE);
chip->comm_page->sample_rate = __constant_cpu_to_le32(44100);
cpu_to_le32(DSP_MIDI_OUT_FIFO_SIZE);
chip->comm_page->sample_rate = cpu_to_le32(44100);
chip->sample_rate = 44100;

/* Set line levels so we don't blast any inputs on startup */
Expand Down
4 changes: 2 additions & 2 deletions sound/pci/echoaudio/gina20_dsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,10 @@ static int set_professional_spdif(struct echoaudio *chip, char prof)
DE_ACT(("set_professional_spdif %d\n", prof));
if (prof)
chip->comm_page->flags |=
__constant_cpu_to_le32(DSP_FLAG_PROFESSIONAL_SPDIF);
cpu_to_le32(DSP_FLAG_PROFESSIONAL_SPDIF);
else
chip->comm_page->flags &=
~__constant_cpu_to_le32(DSP_FLAG_PROFESSIONAL_SPDIF);
~cpu_to_le32(DSP_FLAG_PROFESSIONAL_SPDIF);
chip->professional_spdif = prof;
return update_flags(chip);
}
4 changes: 2 additions & 2 deletions sound/pci/echoaudio/layla20_dsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,10 +284,10 @@ static int set_professional_spdif(struct echoaudio *chip, char prof)
DE_ACT(("set_professional_spdif %d\n", prof));
if (prof)
chip->comm_page->flags |=
__constant_cpu_to_le32(DSP_FLAG_PROFESSIONAL_SPDIF);
cpu_to_le32(DSP_FLAG_PROFESSIONAL_SPDIF);
else
chip->comm_page->flags &=
~__constant_cpu_to_le32(DSP_FLAG_PROFESSIONAL_SPDIF);
~cpu_to_le32(DSP_FLAG_PROFESSIONAL_SPDIF);
chip->professional_spdif = prof;
return update_flags(chip);
}
4 changes: 2 additions & 2 deletions sound/pci/echoaudio/mia_dsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,10 @@ static int set_professional_spdif(struct echoaudio *chip, char prof)
DE_ACT(("set_professional_spdif %d\n", prof));
if (prof)
chip->comm_page->flags |=
__constant_cpu_to_le32(DSP_FLAG_PROFESSIONAL_SPDIF);
cpu_to_le32(DSP_FLAG_PROFESSIONAL_SPDIF);
else
chip->comm_page->flags &=
~__constant_cpu_to_le32(DSP_FLAG_PROFESSIONAL_SPDIF);
~cpu_to_le32(DSP_FLAG_PROFESSIONAL_SPDIF);
chip->professional_spdif = prof;
return update_flags(chip);
}
Expand Down
4 changes: 2 additions & 2 deletions sound/pci/echoaudio/midi.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ static int enable_midi_input(struct echoaudio *chip, char enable)
if (enable) {
chip->mtc_state = MIDI_IN_STATE_NORMAL;
chip->comm_page->flags |=
__constant_cpu_to_le32(DSP_FLAG_MIDI_INPUT);
cpu_to_le32(DSP_FLAG_MIDI_INPUT);
} else
chip->comm_page->flags &=
~__constant_cpu_to_le32(DSP_FLAG_MIDI_INPUT);
~cpu_to_le32(DSP_FLAG_MIDI_INPUT);

clear_handshake(chip);
return send_vector(chip, DSP_VC_UPDATE_FLAGS);
Expand Down

0 comments on commit e930e99

Please sign in to comment.