Re: PRs for dagrab and cdparanoia reworked
Simon Barner wrote: FWIW, the mplayer port also cannot play CDDA anymore on current. It probably needs a similar patch. This works for me with a patched version of cdparanoia, which makes sense, since mplayer is linked against libcdda_paranoia.so.0. You can get the patch here: http://home.leo.org/~barner/freebsd/cdparanoia-pread.patch Great. I had not tracked the issue closely enough to find the dependency on cdparanoia. Everything will be fine then once that patch is in the ports tree. Lars -- Lars Eggert <[EMAIL PROTECTED]> USC Information Sciences Institute smime.p7s Description: S/MIME Cryptographic Signature
Re: PRs for dagrab and cdparanoia reworked
> FWIW, the mplayer port also cannot play CDDA anymore on current. It > probably needs a similar patch. This works for me with a patched version of cdparanoia, which makes sense, since mplayer is linked against libcdda_paranoia.so.0. You can get the patch here: http://home.leo.org/~barner/freebsd/cdparanoia-pread.patch When I run % mplayer cdda:// the CD is played. The following output of fstat makes me believe that that cdparanoia really uses the "cooked interface" of the ATA driver and not the ATAPICAM interface (although I don't know how that one translates its requests into ATA'ish ones). In short: It works for me with an ATAPI CD/RW drive. Simon signature.asc Description: Digital signature
Re: PRs for dagrab and cdparanoia reworked (was: Re: Fix for WINE on -CURRENT)
> > I am progress of doing the same for dagrab (expect a follow-up to PR > > 57227 soon). > > There is no need for extra-patches. > #ifdef CDIOCREADAUDIO seems to be sufficient enough. The version in GNATs is obsoleted, but my update did not make it there, although it appeared in freebsd-ports-bugs@ (I used the follow-up email-link in the GNATs web interface). I will prepare and test a version that used pread() like yours this night. It will be here then: http://home.leo.org/~barner/freebsd/dagrab-pread.patch > Is using CDRIOCSETBLOCKSIZE necessary as well? > If yes it shouold be done in enable_cdda callback I think. I don't now. I don't know how to interpret Soren's comments in http://freebsd.rambler.ru/bsdmail/freebsd-current_2003/msg15989.html regarding our situation: > The right way of doing audio graps has been to set the wanted > blocksize with CDRIOCSETBLOCKSIZE (not needed if all tracks on > the CD is of the same size), then just read from the device. > Ioctl's was newer meant to be used to read/write data, its also > faster to use the R/W path... Can we assue that all tracks on an audio CD are of the same (block) size? What about those mixed-mode CDs (sorry, I don't know the specifications). > Moreover, is there a reason we should use CDIOCREADAUDIO on RELENG_4? > Please test attached patch. works for me on RELENG_4 and should work > on -CURRENT as well. Yep, it works fine for me on 4.9-STABLE and 5.1-CURRENT (and complies with Soren's posting). I think the best solution would be to patch all applications to use this approach. The only question is whether we need CDRIOCSETBLOCKSIZE. Simon signature.asc Description: Digital signature
Re: PRs for dagrab and cdparanoia reworked
Simon Barner wrote: please revise the patch and submit follow-up. Done. Tested on both -STABLE and -CURRENT. I am progress of doing the same for dagrab (expect a follow-up to PR 57227 soon). FWIW, the mplayer port also cannot play CDDA anymore on current. It probably needs a similar patch. Lars -- Lars Eggert <[EMAIL PROTECTED]> USC Information Sciences Institute smime.p7s Description: S/MIME Cryptographic Signature
Re: PRs for dagrab and cdparanoia reworked (was: Re: Fix for WINE on -CURRENT)
Hello! On Wed, Nov 05, 2003 at 02:10:02PM +0100, Simon Barner wrote: > > please revise the patch and submit follow-up. > > Done. Tested on both -STABLE and -CURRENT. > > I am progress of doing the same for dagrab (expect a follow-up to PR > 57227 soon). There is no need for extra-patches. #ifdef CDIOCREADAUDIO seems to be sufficient enough. Is using CDRIOCSETBLOCKSIZE necessary as well? If yes it shouold be done in enable_cdda callback I think. Moreover, is there a reason we should use CDIOCREADAUDIO on RELENG_4? Please test attached patch. works for me on RELENG_4 and should work on -CURRENT as well. /fjoe Index: Makefile === RCS file: /home/pcvs/ports/audio/cdparanoia/Makefile,v retrieving revision 1.8 diff -u -p -r1.8 Makefile --- Makefile14 Jul 2003 02:52:55 - 1.8 +++ Makefile5 Nov 2003 14:05:27 - @@ -7,7 +7,7 @@ PORTNAME= cdparanoia PORTVERSION= 3.9.8 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES=audio sysutils MASTER_SITES= http://www.xiph.org/paranoia/download/ DISTNAME= ${PORTNAME}-${PORTVERSION:C/^3\./III-alpha/} Index: files/patch-interface-cooked_interface.c === RCS file: /home/pcvs/ports/audio/cdparanoia/files/patch-interface-cooked_interface.c,v retrieving revision 1.2 diff -u -p -r1.2 patch-interface-cooked_interface.c --- files/patch-interface-cooked_interface.c11 Jan 2003 09:15:00 - 1.2 +++ files/patch-interface-cooked_interface.c5 Nov 2003 14:38:09 - @@ -1,11 +1,5 @@ -Index: interface/cooked_interface.c -=== -RCS file: /home/cvs/cdparanoia/interface/cooked_interface.c,v -retrieving revision 1.1.1.1 -retrieving revision 1.8 -diff -u -r1.1.1.1 -r1.8 interface/cooked_interface.c 2003/01/05 09:46:26 1.1.1.1 -+++ interface/cooked_interface.c 2003/01/11 08:58:45 1.8 +--- interface/cooked_interface.c.orig Thu Apr 20 05:41:04 2000 interface/cooked_interface.c Wed Nov 5 20:37:44 2003 @@ -1,6 +1,8 @@ /** * CopyPolicy: GNU Public License 2 applies @@ -23,7 +17,7 @@ diff -u -r1.1.1.1 -r1.8 static int cooked_readtoc (cdrom_drive *d){ int i; int tracks; -@@ -129,6 +132,128 @@ +@@ -129,6 +132,120 @@ return(sectors); } @@ -96,18 +90,10 @@ diff -u -r1.1.1.1 -r1.8 +cooked_read(cdrom_drive *d, void *p, long begin, long sectors) +{ + int retry_count = 0; -+ struct ioc_read_audio arg; -+ -+ if (sectors > d->nsectors) -+ sectors = d->nsectors; -+ -+ arg.address_format = CD_LBA_FORMAT; -+ arg.address.lba = begin; -+ arg.buffer = p; ++ int bsize = CD_FRAMESIZE_RAW; + + for (;;) { -+ arg.nframes = sectors; -+ if (ioctl(d->ioctl_fd, CDIOCREADAUDIO, &arg) == -1) { ++ if (pread(d->ioctl_fd, p, sectors*bsize, begin*bsize) != sectors*bsize) { + if (!d->error_retry) + return -7; + @@ -152,7 +138,7 @@ diff -u -r1.1.1.1 -r1.8 /* hook */ static int Dummy (cdrom_drive *d,int Switch){ return(0); -@@ -193,6 +318,7 @@ +@@ -193,6 +310,7 @@ int cooked_init_drive (cdrom_drive *d){ int ret; @@ -160,7 +146,7 @@ diff -u -r1.1.1.1 -r1.8 switch(d->drive_type){ case MATSUSHITA_CDROM_MAJOR:/* sbpcd 1 */ case MATSUSHITA_CDROM2_MAJOR: /* sbpcd 2 */ -@@ -243,6 +369,9 @@ +@@ -243,6 +361,9 @@ default: d->nsectors=40; } ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "[EMAIL PROTECTED]"
PRs for dagrab and cdparanoia reworked (was: Re: Fix for WINE on -CURRENT)
> please revise the patch and submit follow-up. Done. Tested on both -STABLE and -CURRENT. I am progress of doing the same for dagrab (expect a follow-up to PR 57227 soon). Simon signature.asc Description: Digital signature