[PATCH] snd_hda compilation fix
Henrik Friedrichsen
henrik at cheat-project.com
Wed Apr 11 19:03:06 UTC 2007
Hey.
This patch fixes the compilation issues some users have when applying
the current snd_hda patch to the 6.2 kernel. Apply the snd_hda patch and
then the attached one. This is probably very messy, but it should fix the
compilation errors.
I hope this is useful to anyone else beside me. Keep up the good work,
ariff.
Yours,
Henrik.
-------------- next part --------------
diff -Naur sys/dev/sound/pci/atiixp.c sysold/dev/sound/pci/atiixp.c
--- sys/dev/sound/pci/atiixp.c Tue Apr 10 16:19:30 2007
+++ sysold/dev/sound/pci/atiixp.c Tue Apr 10 16:26:41 2007
@@ -65,15 +65,6 @@
SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/atiixp.c,v 1.2.2.5 2006/11/14 13:08:11 ariff Exp $");
-#define ATI_IXP_DMA_RETRY_MAX 100
-
-#define ATI_IXP_BUFSZ_MIN 4096
-#define ATI_IXP_BUFSZ_MAX 65536
-#define ATI_IXP_BUFSZ_DEFAULT 16384
-
-#define ATI_IXP_BLK_MIN 32
-#define ATI_IXP_BLK_ALIGN (~(ATI_IXP_BLK_MIN - 1))
-
struct atiixp_dma_op {
volatile uint32_t addr;
volatile uint16_t status;
@@ -125,8 +116,6 @@
struct callout poll_timer;
int poll_ticks, polling;
};
-
-
#define atiixp_rd(_sc, _reg) \
bus_space_read_4((_sc)->st, (_sc)->sh, _reg)
diff -Naur sys/dev/sound/pci/ich.c sysold/dev/sound/pci/ich.c
--- sys/dev/sound/pci/ich.c Tue Apr 10 16:21:06 2007
+++ sysold/dev/sound/pci/ich.c Tue Apr 10 16:26:41 2007
@@ -41,12 +41,6 @@
#define ICH_DEFAULT_BUFSZ 16384
#define ICH_MAX_BUFSZ 65536
-#define ICH_MIN_BLKCNT 2
-#define ICH_MIN_BLKSZ 64
-#define ICH_DEFAULT_BLKCNT 2
-#define ICH_MIN_BUFSZ 4096
-#define ICH_MAX_BLKCNT 32
-
#define INTEL_VENDORID 0x8086
#define SIS_VENDORID 0x1039
#define NVIDIA_VENDORID 0x10de
diff -Naur sys/dev/sound/pcm/sound.h sysold/dev/sound/pcm/sound.h
--- sys/dev/sound/pcm/sound.h Tue Apr 10 16:18:07 2007
+++ sysold/dev/sound/pcm/sound.h Tue Apr 10 16:26:41 2007
@@ -125,8 +125,6 @@
[etc.]
*/
-#define bus_get_dma_tag(driver) NULL
-
#define PCMMAXCHAN 0xff
#define PCMMAXDEV 0x0f
#define PCMMAXUNIT 0x0f
diff -Naur sys/dev/sound/pcm/vchan.c sysold/dev/sound/pcm/vchan.c
--- sys/dev/sound/pcm/vchan.c Tue Apr 10 16:15:51 2007
+++ sysold/dev/sound/pcm/vchan.c Tue Apr 10 16:26:41 2007
@@ -36,43 +36,18 @@
*/
#define VCHAN_DEFAULT_SPEED 48000
-#define VCHAN_DEFAULT_AFMT (AFMT_S16_LE | AFMT_STEREO)
-#define VCHAN_DEFAULT_STRFMT "s16le"
-
-#define vchan_valid_format(fmt) \
- afmt2afmtstr(vchan_supported_fmts, fmt, NULL, 0, 0, \
- AFMTSTR_STEREO_RETURN)
-#define vchan_valid_strformat(strfmt) \
- afmtstr2afmt(vchan_supported_fmts, strfmt, AFMTSTR_STEREO_RETURN);
-
-/* support everything (mono / stereo), except a-law / mu-law */
-static struct afmtstr_table vchan_supported_fmts[] = {
- { "u8", AFMT_U8 }, { "s8", AFMT_S8 },
- { "s16le", AFMT_S16_LE }, { "s16be", AFMT_S16_BE },
- { "u16le", AFMT_U16_LE }, { "u16be", AFMT_U16_BE },
- { "s24le", AFMT_S24_LE }, { "s24be", AFMT_S24_BE },
- { "u24le", AFMT_U24_LE }, { "u24be", AFMT_U24_BE },
- { "s32le", AFMT_S32_LE }, { "s32be", AFMT_S32_BE },
- { "u32le", AFMT_U32_LE }, { "u32be", AFMT_U32_BE },
- { NULL, 0 },
-};
-
-/* alias table, shorter. */
-static const struct {
- char *alias, *fmtstr;
-} vchan_fmtstralias[] = {
- { "8", "u8" }, { "16", "s16le" },
- { "24", "s24le" }, { "32", "s32le" },
- { NULL, NULL },
-};
-
extern int feeder_rate_ratemin;
extern int feeder_rate_ratemax;
struct vchinfo {
- uint32_t spd, fmt, fmts[2], blksz, bps, run;
+ u_int32_t spd, fmt, blksz, bps, run;
struct pcm_channel *channel, *parent;
struct pcmchan_caps caps;
+};
+
+static u_int32_t vchan_fmt[] = {
+ AFMT_STEREO | AFMT_S16_LE,
+ 0
};
static int
More information about the freebsd-multimedia
mailing list