Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
CLI cd-players obsolete.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
teika
Tux's lil' helper
Tux's lil' helper


Joined: 19 Feb 2011
Posts: 112
Location: Teika rhymes w/ "Stay blur", not ψ̄

PostPosted: Sun Jul 05, 2015 6:20 am    Post subject: CLI cd-players obsolete. Reply with quote

Summary: CLI CD players are obsolete today. In fact, it's not essential they're CLI, but that they depend solely on ioctl, not on alsa/oss.
cdda dependent tools are ok. See answers (1) and (2) below for details.
I've sent this bug report asking deletion of related packages.

EDIT: Below is the original post on 2015-07-15.

title: Are CLI cd-players obsolete on recent PCs?

(Intentionally avoided the multimedia forum.)

In short, I guess command-line CD players are obsolete on some/most recent hardwares, including mine.
* They look to work correctly, but remain mute.
* The operation is done only with CD ioctl's.

There're several CLI cd-players in media-sound/. At least: cdcd, cdplay, cdtool, dcd, mcdp, takcd.

Let's take mcdp-0.4b for example, of which code is really tiny.
The main loop is mcdp.c, reacting keypresses. If you press 's', cd_start (or cd_stop) is called. It's defined in cddev.c, which eventually call cd_playmsf. It does an ioctl - and that's all! No alsa/oss. If you're not convinced, you can see that even volume control is done by ioctl.

(To understand kernel CD ioctl, all you have to read are:
* /usr/src/linux/drivers/cdrom/cdrom.c
* /usr/include/linux/cdrom.h
* Documentation/cdrom/* )

mcdp reports errors when any, but on my PC, it looks to run without problem. The screen looks OK, and the CD actually sounds turning correctly. It simply stay silent. I believe alsa is set fine.

Similar bug reports are found:
* http://gnats.netbsd.org/45678
* http://mail-index.netbsd.org/netbsd-bugs/2011/11/25/msg025040.html
* https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=71527
* https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=709909

Maybe we should delete these packages, or at least einfo upon merging, but before filing a bug request, let us share knowledge. Thanks beforehand.


Last edited by teika on Fri Mar 03, 2017 8:30 am; edited 1 time in total
Back to top
View user's profile Send private message
Maitreya
Guru
Guru


Joined: 11 Jan 2006
Posts: 421

PostPosted: Mon Jul 06, 2015 1:04 pm    Post subject: Reply with quote

So you are sending commands to cd player to start playing outside the OS.
This seems like the olden days where I had my sound card connected directly with my cd player with an extra cable to support this ;)
Back to top
View user's profile Send private message
teika
Tux's lil' helper
Tux's lil' helper


Joined: 19 Feb 2011
Posts: 112
Location: Teika rhymes w/ "Stay blur", not ψ̄

PostPosted: Thu Jul 16, 2015 4:17 am    Post subject: Reply with quote

Dear readers, could you test a few of these CLI cd-player[1], and report if they work on your PC? (I should have asked in the first post. :p) Most must be so tiny and thus take little time to merge.

[1] I mean: cdcd, cdplay, cdtool, dcd, mcdp, takcd; all found in media-sound/.
_________________
Easy Shift / Ctrl / AltGr ... hack; save your pinkies, type without drudgery: topic 865313
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Thu Jul 16, 2015 8:05 am    Post subject: Reply with quote

cvlc (command line version of vlc) works quite well for anything for me in the past.

to play the first track of the audio cd next to me, maybe you can tweak it more than ...
Code:
cvlc cdda://dev/sr0
VLC media player 2.2.1 Terry Pratchett (Weatherwax) (revision 2.2.1-0-ga425c42)
[0000000001d984c8] dummy interface: using the dummy interface module...
[0000000001d7afc8] core playlist: stopping playback
[00007ff4840928a8] core stream error: cannot pre fill buffer


You may need to tweak it a bit

and those audio geeks here quarralled about ffmpeg / libav => and than said mpv music / media player whatever needs libav

it seems mpv is the big deal these days, you may try that too.

---

Code:
emerge -a cdplay

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N     ] media-sound/cdplay-1.0

Would you like to merge these packages? [Yes/No]

>>> Verifying ebuild manifests

>>> Emerging (1 of 1) media-sound/cdplay-1.0::gentoo
>>> Downloading 'http://gentoo.inode.at/distfiles/cdplay-1.0.tar.gz'
--2015-07-16 11:10:15--  http://gentoo.inode.at/distfiles/cdplay-1.0.tar.gz
Resolving gentoo.inode.at (gentoo.inode.at)... 81.223.20.162
Connecting to gentoo.inode.at (gentoo.inode.at)|81.223.20.162|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://gentoo.mirror.dkm.cz/pub/gentoo/distfiles/cdplay-1.0.tar.gz [following]
--2015-07-16 11:10:15--  http://gentoo.mirror.dkm.cz/pub/gentoo/distfiles/cdplay-1.0.tar.gz
Resolving gentoo.mirror.dkm.cz (gentoo.mirror.dkm.cz)... 86.49.49.49, 2a02:8300:8000:3::49
Connecting to gentoo.mirror.dkm.cz (gentoo.mirror.dkm.cz)|86.49.49.49|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 12779 (12K) [application/octet-stream]
Saving to: '/mnt/sdb2/usr/portage/distfiles/cdplay-1.0.tar.gz'

/mnt/sdb2/usr/porta 100%[=====================>]  12.48K  --.-KB/s   in 0.02s 

2015-07-16 11:10:15 (633 KB/s) - '/mnt/sdb2/usr/portage/distfiles/cdplay-1.0.tar.gz' saved [12779/12779]

 * cdplay-1.0.tar.gz RMD160 SHA1 SHA256 size ;-) ...                                                                                      [ ok ]
>>> Unpacking source...
>>> Unpacking cdplay-1.0.tar.gz to /var/tmp/portage/media-sound/cdplay-1.0/work
>>> Source unpacked in /var/tmp/portage/media-sound/cdplay-1.0/work
>>> Compiling source in /var/tmp/portage/media-sound/cdplay-1.0/work/cdplay-1.0 ...
make -j2 CC=x86_64-pc-linux-gnu-gcc 'CFLAGS=-march=native -O2 -pipe' 'LDFLAGS=-Wl,-O1 -Wl,--as-needed -Wl,--no-keep-memory -Wl,--reduce-memory-overheads'
x86_64-pc-linux-gnu-gcc -march=native -O2 -pipe   -c -o cdplay.o cdplay.c
x86_64-pc-linux-gnu-gcc -march=native -O2 -pipe   -c -o utils.o utils.c
cdplay.c: In function 'set_vol':
cdplay.c:276:5: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d", &channel);
     ^
cdplay.c:279:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d", &volume);
  ^
x86_64-pc-linux-gnu-gcc -Wl,-O1 -Wl,--as-needed -Wl,--no-keep-memory -Wl,--reduce-memory-overheads  cdplay.o utils.o   -o cdplay
>>> Source compiled.
>>> Test phase [not enabled]: media-sound/cdplay-1.0

>>> Install cdplay-1.0 into /var/tmp/portage/media-sound/cdplay-1.0/image/ category media-sound
>>> Completed installing cdplay-1.0 into /var/tmp/portage/media-sound/cdplay-1.0/image/

strip: x86_64-pc-linux-gnu-strip --strip-unneeded -R .comment -R .GCC.command.line -R .note.gnu.gold-version
   usr/bin/cdplay

>>> Installing (1 of 1) media-sound/cdplay-1.0::gentoo

>>> Recording media-sound/cdplay in "world" favorites file...
>>> Auto-cleaning packages...

>>> No outdated packages were found on your system.

 * GNU info directory index is up-to-date.
localhost roman # exit
roman@localhost ~ $ cdplay
roman@localhost ~ $ cdplay --help
Usage: cdplay <OPTIONS>...
Plays Audio CD from commandline.

  -c, --play[=STARTTRACK]    play whole CD in right order and take STARTTRACK
                             as first track.
  -b, --back                 previous track
  -n, --next                 next track
  -d, --device=CDROM-DEVICE  select cdrom device, from which to play
  -e, --reset           hard-reset the cdrom
  -f, --file=FILE            play from list-FILE
  -h, --help                 this output (usage)
  -i, --listtracks           lists all tracks with length
  -I, --playstatus           gives out the current track and time
  -l, --loop                 it will loop --playtrack, --playcd and --random
  -j, --eject                ejects cd
  -m, --mcn                  reads 'Universal Product Code'
  -o, --readvol              reads out the cdrom volumes
  -O, --setvol               sets cdrom volumes
  -p, --pause                pause playing (resume with -u)
  -r, --random               plays the cd in shuffle modus
  -s, --stop                 stops playing
  -t, --playtrack=TRACK      plays a specified TRACK
  -u, --resume               resumes playing from pause
  -v, --verbose              verbose output
  -V, --version              prints version of cdplay and exits

For bugs, write to elmex@ta-sa.org.
You can get cdplay on http://www.ta-sa.org/?entry=cdplay
roman@localhost ~ $ cdplay -d /dev/sr0
roman@localhost ~ $ cdplay -d /dev/sr0


no sound at all.

I am quite sure /dev/cdrom is hardcoded instead of /dev/sr0 these days. I got an error message which indicates this ... in teh other terminal,...


Maybe just edit the source code and redigest the ebuilds, but serious

cvlc and mpv may be the better deal anyway. It is not like that we have the pentium 120 days that we need something that slim anymore. even rasperipi is maybe powerful enough for cvlc (do not have that hardware)

Offtopic, peronsal rant: Good luck on get the stuff out of the tree, i have some other bug requests to prune packages which do not even build but they are still in the tree, and they are "obsolete". Well the tree cleaners have their reasons why they keep packages. => eternal-lands for example. the server refuses old clients and therefore obsolete ... freeorion never worked for myself, the source is a mess, teh client is a mess, ... I also wished tree cleaners would prune more packages, as any ebuild is anyway backuped to some other server forever ...
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43387
Location: 56N 3W

PostPosted: Thu Jul 16, 2015 10:03 am    Post subject: Reply with quote

In days of old, optical drives provided analogue audio to the sound card. Indeed, some drives could not perform digital audio extraction over the digital (PATA) Interface.

With the analogue audio link in place, playing a CDDA volume is only a matter of sending commands to the drive and making sure that the Master and CD controls on the sound card are set correctly - not muted and sliders set to about 70%.

With the removal of the analogue audio wire from the setup, the digital sound needs to be routed to the PCM input on the sound card. There is nothing to stop CLI CD players doing this.

I can't test right now as I only have a netbook to hand.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Cyker
Veteran
Veteran


Joined: 15 Jun 2006
Posts: 1746

PostPosted: Thu Jul 16, 2015 11:28 pm    Post subject: Reply with quote

Oooh that's some nostalgia.

My first CD-ROM drive actually had a full set of play/pause etc buttons on it; Could listen to CDs while in the BIOS config or when it had crashed XD

These days computers, esp. laptops, seem to increasingly come without optical drives :(
Back to top
View user's profile Send private message
Ottre
Tux's lil' helper
Tux's lil' helper


Joined: 23 Dec 2012
Posts: 129

PostPosted: Fri Jul 17, 2015 5:37 am    Post subject: Reply with quote

From the FreeBSD 2.0 release notes:

Quote:

2.1. Disk Controllers

WD1003 (any generic MFM/RLL)
WD1007 (any generic IDE/ESDI)
[Note: the new Extended IDE controllers in newer PC's work, although no
extended features are used.]

Adaptec 152x series ISA SCSI controllers
Adaptec 154x series ISA SCSI controllers
Adaptec 174x series EISA SCSI controller in standard and enhanced mode.
Adaptec 2742/2842 series ISA/EISA SCSI controllers
Adaptec AIC-6260 and AIC-6360 based boards, which includes
the AHA-152x and SoundBlaster SCSI cards.

** Note: You cannot boot from the Soundblaster cards
as they have no on-board BIOS
, which is necessary for mapping
the boot device into the system BIOS I/O vectors.
They're perfectly usable for external tapes, CDROMs, etc,
however.


And the Soundblaster wiki article:

Quote:

CD-ROM Support

Early Intel PCs built after the IBM PC/AT typically only included support for one ATA interface (which controlled up to two ATA devices.) As computer needs grew it became common for a system to need more than 1 ATA interface. With the development of the CD-ROM, many computers could not support it since both devices of the one channel were already used. Several Sound Blaster 16 boards provided an additional IDE interface to computers that had no spare ATA-ports for a CDROM, though the additional drive interface typically only supported one device rather than two, it typically only supported CD ROM drives, and it usually could not support additional hard drives.

The Sound Blaster with the SCSI controller (SB 16 SCSI-2, CT1770, CT1779) was designed for use with "High End" SCSI based CD-ROM drives. The controller did not have the on-board firmware (Boot BIOS) to start an OS from a SCSI hard drive. Normally that meant that SCSI device ID-0 and ID-1 were not used. As well, if the computer did have a SCSI hard drive with the required SCSI controller then the settings for the SCSI controller on the SB card had to be selected so that the SB SCSI-2 interface did not conflict with the main SCSI controller.

Most Sound Blaster 16 cards feature connectors for CD-audio input. This was a necessity since most operating systems and CD-ROM drives of the time did not support streaming CD-audio digitally over the main interface. The CD-audio input could also be daisy-chained from another sound generating device, such as an MPEG decoder or TV tuner card.


8)
Back to top
View user's profile Send private message
teika
Tux's lil' helper
Tux's lil' helper


Joined: 19 Feb 2011
Posts: 112
Location: Teika rhymes w/ "Stay blur", not ψ̄

PostPosted: Tue Oct 11, 2016 11:38 am    Post subject: Reply with quote

I submitted a bug report. If you want CLI cdplayers to remain in the portage tree, please comment there.

Sorry for not updating for a year. ;-)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum