Don't compile audio codecs into native bootloader builds.

Change-Id: I0b2cc143572bf88423bdf7647cee0af567aee684
This commit is contained in:
Solomon Peachy 2020-10-08 17:22:06 -04:00
parent ff6e175c20
commit dc81f96fd1
4 changed files with 16 additions and 8 deletions

View file

@ -436,7 +436,9 @@ drivers/audio/audiohw-swcodec.c
#endif /* BOOTLOADER */ #endif /* BOOTLOADER */
/* Audio codec */ /* Audio codec */
#if (CONFIG_PLATFORM & PLATFORM_NATIVE) && !defined(BOOTLOADER) #if !defined(BOOTLOADER)
#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
#if defined(HAVE_UDA1380) #if defined(HAVE_UDA1380)
drivers/audio/uda1380.c drivers/audio/uda1380.c
#elif defined(HAVE_WM8740) #elif defined(HAVE_WM8740)
@ -506,7 +508,9 @@ target/hosted/sdl/pcm-sdl.c
#endif /* (CONFIG_PLATFORM & PLATFORM_MAEMO) */ #endif /* (CONFIG_PLATFORM & PLATFORM_MAEMO) */
#endif #endif
#endif /* (CONFIG_PLATFORM & PLATFORM_NATIVE) && !defined(BOOTLOADER) */ #endif /* (CONFIG_PLATFORM & PLATFORM_NATIVE) */
#endif /* !defined(BOOTLOADER) */
/* CPU Specific - By class then particular chip if applicable */ /* CPU Specific - By class then particular chip if applicable */
#if defined(CPU_COLDFIRE) #if defined(CPU_COLDFIRE)

View file

@ -43,7 +43,7 @@ $(BUILDDIR)/rockbox.elf : $$(OBJ) $(FIRMLIB) $(VOICESPEEXLIB) $(CORE_LIBS)
-L$(BUILDDIR)/lib $(call a2lnk,$(CORE_LIBS)) \ -L$(BUILDDIR)/lib $(call a2lnk,$(CORE_LIBS)) \
$(LDOPTS) $(GLOBAL_LDOPTS) -Wl,-Map,$(BUILDDIR)/rockbox.map $(LDOPTS) $(GLOBAL_LDOPTS) -Wl,-Map,$(BUILDDIR)/rockbox.map
$(BUILDDIR)/rockbox.rocker : $(BUILDDIR)/rockbox.elf $(BUILDDIR)/$(BINARY): $(BUILDDIR)/rockbox.elf
$(call PRINTS,OC $(@F))$(call objcopy,$^,$@) $(call PRINTS,OC $(@F))$(call objcopy,$^,$@)
endif endif

View file

@ -138,15 +138,22 @@ int button_read_device(void)
bool headphones_inserted(void) bool headphones_inserted(void)
{ {
#ifdef BOOTLOADER
int ps = 0;
#else
int ps = xduoo_get_outputs(); int ps = xduoo_get_outputs();
#endif
return (ps == 2 || ps == 3); return (ps == 2 || ps == 3);
} }
bool lineout_inserted(void) bool lineout_inserted(void)
{ {
#ifdef BOOTLOADER
int ps = 0;
#else
int ps = xduoo_get_outputs(); int ps = xduoo_get_outputs();
#endif
return (ps == 1); return (ps == 1);
} }

View file

@ -43,10 +43,7 @@ $(BUILDDIR)/rockbox.elf : $$(OBJ) $(FIRMLIB) $(VOICESPEEXLIB) $(CORE_LIBS)
-L$(BUILDDIR)/lib $(call a2lnk,$(CORE_LIBS)) \ -L$(BUILDDIR)/lib $(call a2lnk,$(CORE_LIBS)) \
$(LDOPTS) $(GLOBAL_LDOPTS) -Wl,-Map,$(BUILDDIR)/rockbox.map $(LDOPTS) $(GLOBAL_LDOPTS) -Wl,-Map,$(BUILDDIR)/rockbox.map
$(BUILDDIR)/rockbox.x3ii : $(BUILDDIR)/rockbox.elf $(BUILDDIR)/$(BINARY): $(BUILDDIR)/rockbox.elf
$(call PRINTS,OC $(@F))$(call objcopy,$^,$@)
$(BUILDDIR)/rockbox.x20 : $(BUILDDIR)/rockbox.elf
$(call PRINTS,OC $(@F))$(call objcopy,$^,$@) $(call PRINTS,OC $(@F))$(call objcopy,$^,$@)
endif endif