[parisc-linux-cvs] 2.4.17-pa1, harmony changes
Helge Deller
deller@gmx.de
Fri, 4 Jan 2002 00:01:51 +0100
--------------Boundary-00=_3BXD1IIISNMWCI26X4R6
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
On Friday 04 January 2002 00:20, Helge Deller wrote:
> CVSROOT: /var/cvs
> Module name: linux
> Changes by: deller 02/01/03 16:20:31
>
> Modified files:
> . : Makefile
> arch/parisc : defconfig
> drivers/sound : harmony.c
>
> Log message:
> - 2.4.17-pa1
> - adjusted defconfig file to 2.4.17
> - some small harmony changes (artsd still crashes but at a later stage).
> This is still work-in-progress, but much better than before.
--------------Boundary-00=_3BXD1IIISNMWCI26X4R6
Content-Type: text/plain;
charset="iso-8859-1";
name="diff"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="diff"
Index: Makefile
===================================================================
RCS file: /var/cvs/linux/Makefile,v
retrieving revision 1.238
diff -u -p -r1.238 Makefile
--- Makefile 2002/01/03 22:36:43 1.238
+++ Makefile 2002/01/03 23:18:21
@@ -1,7 +1,7 @@
VERSION = 2
PATCHLEVEL = 4
SUBLEVEL = 17
-EXTRAVERSION = -pa0
+EXTRAVERSION = -pa1
KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
Index: arch/parisc/defconfig
===================================================================
RCS file: /var/cvs/linux/arch/parisc/defconfig,v
retrieving revision 1.46
diff -u -p -r1.46 defconfig
--- arch/parisc/defconfig 2001/11/29 21:04:26 1.46
+++ arch/parisc/defconfig 2002/01/03 23:18:22
@@ -108,8 +108,8 @@ CONFIG_MD_RAID5=y
# Networking options
#
CONFIG_PACKET=y
-# CONFIG_PACKET_MMAP is not set
-# CONFIG_NETLINK is not set
+CONFIG_PACKET_MMAP=y
+CONFIG_NETLINK_DEV=y
# CONFIG_NETFILTER is not set
# CONFIG_FILTER is not set
CONFIG_UNIX=y
@@ -123,6 +123,7 @@ CONFIG_IP_PNP_BOOTP=y
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not set
# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
# CONFIG_INET_ECN is not set
# CONFIG_SYN_COOKIES is not set
# CONFIG_IPV6 is not set
@@ -192,6 +193,7 @@ CONFIG_CHR_DEV_SG=y
# CONFIG_SCSI_AHA152X is not set
# CONFIG_SCSI_AHA1542 is not set
# CONFIG_SCSI_AHA1740 is not set
+# CONFIG_SCSI_AACRAID is not set
# CONFIG_SCSI_AIC7XXX is not set
# CONFIG_SCSI_AIC7XXX_OLD is not set
# CONFIG_SCSI_DPT_I2O is not set
@@ -263,6 +265,7 @@ CONFIG_NETDEVICES=y
# CONFIG_BONDING is not set
# CONFIG_EQUALIZER is not set
# CONFIG_TUN is not set
+# CONFIG_ETHERTAP is not set
#
# Ethernet (10 or 100Mbit)
Index: drivers/sound/harmony.c
===================================================================
RCS file: /var/cvs/linux/drivers/sound/harmony.c,v
retrieving revision 1.16
diff -u -p -r1.16 harmony.c
--- drivers/sound/harmony.c 2002/01/03 00:14:59 1.16
+++ drivers/sound/harmony.c 2002/01/03 23:18:22
@@ -629,13 +629,15 @@ static int harmony_audio_ioctl(struct in
unsigned long arg)
{
int ival, new_format;
+ int frag_size, frag_buf;
+ struct audio_buf_info info;
switch (cmd) {
case OSS_GETVERSION:
return put_user(SOUND_VERSION, (int *) arg);
case SNDCTL_DSP_GETCAPS:
- ival = DSP_CAP_DUPLEX | DSP_CAP_BATCH;
+ ival = DSP_CAP_DUPLEX;
return put_user(ival, (int *) arg);
case SNDCTL_DSP_GETFMTS:
@@ -706,10 +708,31 @@ static int harmony_audio_ioctl(struct in
case SNDCTL_DSP_SETFRAGMENT:
if (get_user(ival, (int *)arg))
return -EFAULT;
- if ((ival & 0xffff)*((ival>>16)&0xffff) > (MAX_BUFS*HARMONY_BUF_SIZE))
+ frag_size = ival & 0xffff;
+ frag_buf = (ival>>16) & 0xffff;
+ /* TODO: We use hardcoded fragment sizes and numbers for now */
+ frag_size = 12; /* 4096 == 2^12 */
+ frag_buf = MAX_BUFS;
+ ival = (frag_buf << 16) + frag_size;
+ return put_user(ival, (int *) arg);
+
+ case SNDCTL_DSP_GETOSPACE:
+ if (!(file->f_mode & FMODE_WRITE))
return -EINVAL;
- /* TODO */
- return 0;
+ info.fragstotal = MAX_BUFS;
+ info.fragments = MAX_BUFS - harmony.nb_filled_play;
+ info.fragsize = HARMONY_BUF_SIZE;
+ info.bytes = info.fragments * info.fragsize;
+ return copy_to_user((void *)arg, &info, sizeof(info));
+
+ case SNDCTL_DSP_GETISPACE:
+ if (!(file->f_mode & FMODE_READ))
+ return -EINVAL;
+ info.fragstotal = MAX_BUFS;
+ info.fragments = /*MAX_BUFS-*/ harmony.nb_filled_record;
+ info.fragsize = HARMONY_BUF_SIZE;
+ info.bytes = info.fragments * info.fragsize;
+ return copy_to_user((void *)arg, &info, sizeof(info));
}
return -EINVAL;
}
--------------Boundary-00=_3BXD1IIISNMWCI26X4R6--