Port-arm archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: FDT without audio
Jared McNeill <jmcneill%invisible.ca@localhost> wrote:
>On Mon, 14 May 2018, Robert Swindells wrote:
>>
>> I'm trying to convert a port over to use FDT and am getting an
>> error because it doesn't include any audio devices:
>>
>> In file included from ../../../../dev/audio_dai.h:32:0,
>> from ../../../../dev/fdt/fdtvar.h:39,
>> from ../../../../arch/arm/fdt/arm_fdt.c:41:
>> ../../../../dev/audio_if.h:49:2: error: #error "No 'audio* at audiobus?' or 'midi* at midibus?' or similar configured"
>> #error "No 'audio* at audiobus?' or 'midi* at midibus?' or similar configured"
>> ^~~~~
>
>Yuck. Does this help?
[snip]
Probably, will try that.
I had got it to build with a slightly more extensive patch of:
Index: fdtvar.h
===================================================================
RCS file: /cvsroot/src/sys/dev/fdt/fdtvar.h,v
retrieving revision 1.31
diff -u -r1.31 fdtvar.h
--- fdtvar.h 9 May 2018 23:59:05 -0000 1.31
+++ fdtvar.h 14 May 2018 20:59:32 -0000
@@ -36,7 +36,13 @@
#include <dev/i2c/i2cvar.h>
#include <dev/pwm/pwmvar.h>
#include <dev/clk/clk.h>
+
+#if defined(_KERNEL_OPT)
+#include "audio.h"
+#if NAUDIO > 0
#include <dev/audio_dai.h>
+#endif
+#endif
#include <dev/clock_subr.h>
@@ -122,9 +128,11 @@
int (*reset_deassert)(device_t, void *);
};
+#if NAUDIO > 0
struct fdtbus_dai_controller_func {
audio_dai_tag_t (*get_tag)(device_t, const void *, size_t);
};
+#endif
struct fdtbus_dma_controller;
@@ -238,8 +246,10 @@
const struct fdtbus_clock_controller_func *);
int fdtbus_register_reset_controller(device_t, int,
const struct fdtbus_reset_controller_func *);
+#if NAUDIO > 0
int fdtbus_register_dai_controller(device_t, int,
const struct fdtbus_dai_controller_func *);
+#endif
int fdtbus_register_dma_controller(device_t, int,
const struct fdtbus_dma_controller_func *);
int fdtbus_register_power_controller(device_t, int,
@@ -271,8 +281,10 @@
void fdtbus_gpio_write(struct fdtbus_gpio_pin *, int);
int fdtbus_gpio_read_raw(struct fdtbus_gpio_pin *);
void fdtbus_gpio_write_raw(struct fdtbus_gpio_pin *, int);
+#if NAUDIO > 0
audio_dai_tag_t fdtbus_dai_acquire(int, const char *);
audio_dai_tag_t fdtbus_dai_acquire_index(int, const char *, int);
+#endif
pwm_tag_t fdtbus_pwm_acquire(int, const char *);
pwm_tag_t fdtbus_pwm_acquire_index(int, const char *, int);
void fdtbus_pinctrl_configure(void);
Index: files.fdt
===================================================================
RCS file: /cvsroot/src/sys/dev/fdt/files.fdt,v
retrieving revision 1.26
diff -u -r1.26 files.fdt
--- files.fdt 9 May 2018 23:59:05 -0000 1.26
+++ files.fdt 14 May 2018 20:59:32 -0000
@@ -47,7 +47,7 @@
file dev/fdt/fdt_openfirm.c fdtbus
file dev/fdt/fdt_subr.c fdtbus
file dev/fdt/fdt_clock.c fdtbus
-file dev/fdt/fdt_dai.c fdtbus
+file dev/fdt/fdt_dai.c fdtbus & audio
file dev/fdt/fdt_dma.c fdtbus
file dev/fdt/fdt_gpio.c fdtbus
file dev/fdt/fdt_i2c.c fdtbus
Home |
Main Index |
Thread Index |
Old Index