Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3f6175ec authored by Mark Brown's avatar Mark Brown Committed by Takashi Iwai
Browse files

ALSA: echoaudio: Use standard C definitions of true and false



The echoaudio locally defines TRUE and FALSE.  Not only is this
redundant given that C now has a boolean type it results in lots of
warnings as other headers also define these macros, causing duplicate
definitions.  Fix this by removing the local defines and converting all
local users to use the standard C true and false instead, simply
removing the macros is less safe due to implicit inclusion of the other
definitons.

[fixed overlooked replacement of FALSE by tiwai]

Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 96bab82f
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -44,18 +44,18 @@ static int init_hw(struct echoaudio *chip, u16 device_id, u16 subdevice_id)

	chip->device_id = device_id;
	chip->subdevice_id = subdevice_id;
	chip->bad_board = TRUE;
	chip->bad_board = true;
	chip->dsp_code_to_load = FW_DARLA20_DSP;
	chip->spdif_status = GD_SPDIF_STATUS_UNDEF;
	chip->clock_state = GD_CLOCK_UNDEF;
	/* Since this card has no ASIC, mark it as loaded so everything
	   works OK */
	chip->asic_loaded = TRUE;
	chip->asic_loaded = true;
	chip->input_clock_types = ECHO_CLOCK_BIT_INTERNAL;

	if ((err = load_firmware(chip)) < 0)
		return err;
	chip->bad_board = FALSE;
	chip->bad_board = false;

	return err;
}
+3 −3
Original line number Diff line number Diff line
@@ -44,17 +44,17 @@ static int init_hw(struct echoaudio *chip, u16 device_id, u16 subdevice_id)

	chip->device_id = device_id;
	chip->subdevice_id = subdevice_id;
	chip->bad_board = TRUE;
	chip->bad_board = true;
	chip->dsp_code_to_load = FW_DARLA24_DSP;
	/* Since this card has no ASIC, mark it as loaded so everything
	   works OK */
	chip->asic_loaded = TRUE;
	chip->asic_loaded = true;
	chip->input_clock_types = ECHO_CLOCK_BIT_INTERNAL |
		ECHO_CLOCK_BIT_ESYNC;

	if ((err = load_firmware(chip)) < 0)
		return err;
	chip->bad_board = FALSE;
	chip->bad_board = false;

	return err;
}
+8 −8
Original line number Diff line number Diff line
@@ -59,8 +59,8 @@ static int init_hw(struct echoaudio *chip, u16 device_id, u16 subdevice_id)
		cpu_to_le32((E3G_MAGIC_NUMBER / 48000) - 2);
	chip->device_id = device_id;
	chip->subdevice_id = subdevice_id;
	chip->bad_board = TRUE;
	chip->has_midi = TRUE;
	chip->bad_board = true;
	chip->has_midi = true;
	chip->dsp_code_to_load = FW_ECHO3G_DSP;

	/* Load the DSP code and the ASIC on the PCI card and get
@@ -78,8 +78,8 @@ static int init_hw(struct echoaudio *chip, u16 device_id, u16 subdevice_id)
		chip->px_analog_in = chip->bx_analog_in = 14;
		chip->px_digital_in = chip->bx_digital_in = 16;
		chip->px_num = chip->bx_num = 24;
		chip->has_phantom_power = TRUE;
		chip->hasnt_input_nominal_level = TRUE;
		chip->has_phantom_power = true;
		chip->hasnt_input_nominal_level = true;
	} else if (err == E3G_LAYLA3G_BOX_TYPE) {
		chip->input_clock_types =	ECHO_CLOCK_BIT_INTERNAL |
						ECHO_CLOCK_BIT_SPDIF |
@@ -106,10 +106,10 @@ static int init_hw(struct echoaudio *chip, u16 device_id, u16 subdevice_id)
static int set_mixer_defaults(struct echoaudio *chip)
{
	chip->digital_mode = DIGITAL_MODE_SPDIF_RCA;
	chip->professional_spdif = FALSE;
	chip->non_audio_spdif = FALSE;
	chip->bad_board = FALSE;
	chip->phantom_power = FALSE;
	chip->professional_spdif = false;
	chip->non_audio_spdif = false;
	chip->bad_board = false;
	chip->phantom_power = false;
	return init_line_levels(chip);
}

+1 −1
Original line number Diff line number Diff line
@@ -2245,7 +2245,7 @@ static int snd_echo_resume(struct device *dev)

#ifdef ECHOCARD_HAS_MIDI
	if (chip->midi_input_enabled)
		enable_midi_input(chip, TRUE);
		enable_midi_input(chip, true);
	if (chip->midi_out)
		snd_echo_midi_output_trigger(chip->midi_out, 1);
#endif
+2 −5
Original line number Diff line number Diff line
@@ -153,9 +153,6 @@
#define _ECHOAUDIO_H_


#define TRUE 1
#define FALSE 0

#include "echoaudio_dsp.h"


@@ -378,8 +375,8 @@ struct echoaudio {
					 */
	u8 output_clock;		/* Layla20 only */
	char meters_enabled;		/* VU-meters status */
	char asic_loaded;		/* Set TRUE when ASIC loaded */
	char bad_board;			/* Set TRUE if DSP won't load */
	char asic_loaded;		/* Set true when ASIC loaded */
	char bad_board;			/* Set true if DSP won't load */
	char professional_spdif;	/* 0 = consumer; 1 = professional */
	char non_audio_spdif;		/* 3G - only */
	char digital_in_automute;	/* Gina24, Layla24, Mona - only */
Loading