• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Controlling cd/dvd drive's cache
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Controlling cd/dvd drive's cache


  • Subject: Re: Controlling cd/dvd drive's cache
  • From: email@hidden
  • Date: Fri, 13 Jan 2006 10:51:44 -0500 (EST)
  • Importance: Normal

It looks like the READ (12) command has a bit in the header (FUA = Force
Unit Access) that would do the trick.  But now I am stumped on how to
implement it.  The IOKit is 90% of a mystery to me.

All of my current code uses file descriptors and ioctls.  I also have an
io_object_t laying around that I used to extract the BSD path/file
descriptor from.  I believe I could use that to create an
MMCDeviceInterface Can anyone provide/point me at some sample code on how
to do this?

P.S.  Regarding the drive cache, I believe my drive has a 2048M cache for
writing; I assume the same is used for reading.

> Well, as I said, my knowledge of CD devices is becoming stale. I have
> always accessed drives on the very low level, i.e. sending SCSI or
> ATAPI commands to the drive. Maybe you should do the same Also, the
> cache size of 2048 sounds weird. A block of Red Book Audio has 2356
> bytes, so it could not fit in there.
>
> On the level you are working on, I don't think I have any idea how to
> help.
>
> Sorry
>
> Alex
>
> Am 13.01.2006 um 16:19 schrieb email@hidden:
>
>> Alex (et al),
>>
>> Thanks for the reply.  What I am working on is adding "EAC-like"
>> functionality (secure cd ripping) to my application
>> (http://sbooth.org/Max/).  In order to perform true error
>> correction and
>> verify that the audio data is correct, I need to compare multiple
>> reads of
>> the same sector.  Obviously if erroneous data is in the cache then
>> multiple reads of the same sector will always produce the same result.
>> Hence the need to either 1) disable the cache or 2) read a block
>> larger
>> than the cache (2048 on my drive, too large for practical purposes)
>> or 3)
>> read a sector, flush the cache, re-read the sector, etc.  So I am not
>> writing a device driver per se, just performing some low-level
>> manipulation.
>>
>> Stephen
>>
>>> I am not sure on which level you are looking.
>>>
>>> My time in CD-Recording is over for  four years now - which is an
>>> eternity in IT. That said, I am sure the MMC3 command set has
>>> commands to do all these things.
>>>
>>> However, why would you need to do this? If you are writing to the
>>> device yourself, then you probably came across MMC command sets.
>>>
>>> Forcing the cache to be flushed when other applications are writing
>>> to the device is usually not a good idea.
>>>
>>> Alex
>>>
>>> Am 13.01.2006 um 16:05 schrieb email@hidden:
>>>
>>>> Hello all,
>>>>
>>>> I had inquired about this a while back and never got a response, so
>>>> thought I'd ask again.
>>>>
>>>> Is there a way to control the hardware cache on cdrom drives in OS
>>>> X?  For
>>>> example, I would like to turn caching on/off, force a flush of the
>>>> cache,
>>>> etc. It seems there should be an ioctl() to do this.  But, all my
>>>> searching has turned up nothing.  What have I missed?
>>>>  _______________________________________________
>>>> Do not post admin requests to the list. They will be ignored.
>>>> Darwin-dev mailing list      (email@hidden)
>>>> Help/Unsubscribe/Update your Subscription:
>>>>
>>>> This email sent to email@hidden
>>>
>>>
>>
>
>

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Controlling cd/dvd drive's cache
      • From: Alexander von Below <email@hidden>
References: 
 >Controlling cd/dvd drive's cache (From: email@hidden)
 >Re: Controlling cd/dvd drive's cache (From: Alexander von Below <email@hidden>)
 >Re: Controlling cd/dvd drive's cache (From: email@hidden)
 >Re: Controlling cd/dvd drive's cache (From: Alexander von Below <email@hidden>)

  • Prev by Date: Re: Controlling cd/dvd drive's cache
  • Next by Date: Re: Controlling cd/dvd drive's cache
  • Previous by thread: Re: Controlling cd/dvd drive's cache
  • Next by thread: Re: Controlling cd/dvd drive's cache
  • Index(es):
    • Date
    • Thread