throbber
/Users/implicit/Desktop/Source Code/2001.11.…/…/…/main/sampleclock.c
`Page 1/15
`Saved: 11/9/01, 1:50:18 PM
`Printed for: Implicit
`
`/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
`
`Copyright (c) 2001 BeComm Corporation
`
`Filename:
`
` sampleclock.c
`
`Group Name:
`
` todo
`
`Group Overview:
`
` todo
`
`Owner:
`
` Guy Carpenter (guyc) 16-Aug-2001
`
`-----------------------------------------------------------------------------*/
`#define SOS_DEBUG_ZONE "/classes/sampleclock"
`
`#include <sosstrings.h>
`#include <sosmultimedia.h>
`
`SOS_SOURCE_VERSION (
` "$Id: sampleclock.c,v 1.14 2001/11/09 19:50:18 guyc Exp $"
`);
`
`/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
`Definitions
`+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
`#define SAMPLECLOCK_CLASS_NAME "sampleclock"
`#define SAMPLECLOCK_SCHEME_NAME "sampleclock"
`
`#define LOCK(C) SOS_Lock_Acquire(C->Lock)
`#define UNLOCK(C) SOS_Lock_Release(C->Lock)
`/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
`globals
`+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
`static
`SOS_REGOBJECTCLASS * g_SampleClockClass = NULL;
`
`static
`
`1 2
`
`3 4
`
`5 6
`
`7 8
`
`9
`10
`11
`12
`13
`14
`15
`16
`17
`18
`19
`20
`21
`22
`23
`24
`25
`26
`27
`28
`29
`30
`31
`32
`33
`34
`35
`36
`37
`38
`39
`40
`41
`42
`43
`44
`45
`
`Page 1 of 15
`
`Implicit Exhibit 2086
`Sonos v. Implicit, IPR2018-0766, -0767
`
`

`

`/Users/implicit/Desktop/Source Code/2001.11.…/…/…/main/sampleclock.c
`Page 2/15
`Saved: 11/9/01, 1:50:18 PM
`Printed for: Implicit
`
`SOS_STRINGTABLE * g_NamedClockTable = NULL;
`
`static
`SOS_LOCK * g_NamedClockTableLock = NULL;
`
`46
`47
`48
`49
`50
`51
`52
`53
`54
`55
`56
`57
`58
`59
`60
`61
`62
`63
`64
`65
`66
`67
`68
`69
`70
`71
`72
`73
`/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
`74
`Basic Object Methods
`75
`+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
`76
`static
`77
`SOS_STATUS
`78
`SampleClock_Init(
`79
` SOS_REGOBJECT * Object
`80
`)81
`{82
` SOS_STATUS status = SOS_Success;
`83
`84
`85
`86
`87
`88
`89
`90
`
`typedef struct _SAMPLECLOCK {
` SOS_CLOCK_TICK Time;
` SOS_UINT32 Sample;
` SOS_UINT32 Frequency;
` SOS_UINT32 Divisor;
` SOS_BOOLEAN IsSet;
` SOS_LOCK * Lock;
` char * Name;
`} SAMPLECLOCK;
`
`/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
`Macros
`+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
`
`#define RESOLVE(O) SOS_REGOBJECT_RESOLVE(O,g_SampleClockClass)
`#define ISVALID(O) SOS_REGOBJECT_ISVALID(O,g_SampleClockClass)
`#define IRESOLVE(I) SOS_INTERFACE_RESOLVE(I,g_SampleClockClass)
`#define IISVALID(I) SOS_INTERFACE_ISVALID(I,g_SampleClockClass)
`
`/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
`Types
`+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
`
` SAMPLECLOCK *sampleclock = SOS_Mem_Alloc(sizeof(SAMPLECLOCK));
` SOS_memset(sampleclock, 0, sizeof(SAMPLECLOCK));
`
` /* lock the sampleclock until the first call to set */
` sampleclock->Lock = SOS_Lock_Create();
`
`
`Page 2 of 15
`
`Implicit Exhibit 2086
`Sonos v. Implicit, IPR2018-0766, -0767
`
`

`

`/Users/implicit/Desktop/Source Code/2001.11.…/…/…/main/sampleclock.c
`Page 3/15
`Saved: 11/9/01, 1:50:18 PM
`Printed for: Implicit
`
`static
`void
`SampleClock_Uninit(
` SOS_REGOBJECT * Object
`)
`{
` if (ISVALID(Object)) {
` SAMPLECLOCK *sampleclock = RESOLVE(Object);
`
` if (sampleclock->Name) {
` SOS_StringTable_ElementRemove(
` g_NamedClockTable,
` sampleclock->Name,
` NULL
` );
` }
`
` SOS_RegObject_DataPut(Object, sampleclock);
`91
`
`92
` return status;
`93
`}94
`95
`96
`97
`98
`99
`100
`101
`102
`103
`104
`105
`106
`107
`108
`109
`110
`111
`112
`113
`114
`115
`116
`117
`118
`119
`120
`121
`122
`123
`124
`125
`126
`127
`128
`129
`130
`131
`132
`133
`134
`135
`
` SOS_Lock_Destroy(sampleclock->Lock);
` SOS_Mem_Free(sampleclock->Name);
` SOS_Mem_Free(sampleclock);
` }
`}
`
`/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
`Support functions
`+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
`static
`void
`FactorReduce(
` SOS_UINT32 *Numerator,
` SOS_UINT32 *Denominator
`)
`{
` SOS_UINT32 numerator = *Numerator;
` SOS_UINT32 denominator = *Denominator;
` SOS_UINT32 factor=2;
`
` while (factor<=numerator && factor<=denominator) {
` if (!(numerator%factor) &&
` !(denominator%factor)) {
`
`Page 3 of 15
`
`Implicit Exhibit 2086
`Sonos v. Implicit, IPR2018-0766, -0767
`
`

`

`/Users/implicit/Desktop/Source Code/2001.11.…/…/…/main/sampleclock.c
`Page 4/15
`Saved: 11/9/01, 1:50:18 PM
`Printed for: Implicit
`
`136
`137
`138
`139
`140
`141
`142
`143
`144
`145
`146
`147
`148
`149
`150
`151
`152
`153
`154
`155
`156
`157
`158
`159
`160
`161
`162
`163
`164
`165
`166
`167
`168
`169
`170
`171
`172
`173
`174
`175
`176
`177
`178
`179
`180
`
` numerator/=factor;
` denominator/=factor;
` } else {
` if (factor>2) factor++;
` factor++;
` }
` }
`
` SOS_DEBUGOUT_MINOR_EVENT(
` "Rationalized %lu/%lu to %lu/%lu\n",
` *Numerator,
` *Denominator,
` numerator,
` denominator
` );
`
` *Numerator = numerator;
` *Denominator = denominator;
`}
`
`/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
`
`+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
`static
`SOS_STATUS
`SampleClock_NameSet(
` SOS_REGOBJECT * ClockObject,
` const char * Name
`)
`{
` SAMPLECLOCK * clock = RESOLVE(ClockObject);
` SOS_STATUS status;
` if (!Name || !*Name) {
` /* clock is unnamed */
` status = SOS_Success;
` } else if (clock && !clock->Name) {
` clock->Name = SOS_strdup(Name);
` if (clock->Name) {
` status = SOS_StringTable_ElementPut(
` g_NamedClockTable,
` clock->Name,
` ClockObject
` );
` } else {
` status = SOS_ErrorResourceAllocation;
`
`Page 4 of 15
`
`Implicit Exhibit 2086
`Sonos v. Implicit, IPR2018-0766, -0767
`
`

`

`/Users/implicit/Desktop/Source Code/2001.11.…/…/…/main/sampleclock.c
`Page 5/15
`Saved: 11/9/01, 1:50:18 PM
`Printed for: Implicit
`
`181
`182
`183
`184
`185
`186
`187
`188
`189
`190
`191
`192
`193
`194
`195
`196
`197
`198
`199
`200
`201
`202
`203
`204
`205
`206
`207
`208
`209
`210
`211
`212
`213
`214
`215
`216
`217
`218
`219
`220
`221
`222
`223
`224
`225
`
` }
` } else {
` status = SOS_ErrorParameter;
` }
`
` return status;
`}
`
`static
`SOS_STATUS
`SampleClock_GetByName(
` const char * Name,
` SOS_REGOBJECT ** ClockObject
`)
`{
` SOS_STATUS status;
`
` status = SOS_StringTable_ElementPeek(
` g_NamedClockTable,
` Name,
` (void**)ClockObject
` );
`
` if (SOS_SUCCEEDED(status)) {
` SOS_RegObject_Reference(*ClockObject);
` }
`
` return status;
`}
`
`static
`SOS_STATUS
`SampleClock_FindOrCreateByName(
` const char * Name,
` SOS_REGOBJECT ** ClockObject
`)
`{
` SOS_STATUS status;
`
` SOS_Lock_Acquire(g_NamedClockTableLock);
`
` if (Name && *Name) {
` status = SampleClock_GetByName(Name, ClockObject);
` } else {
` status = SOS_Error;
`
`Page 5 of 15
`
`Implicit Exhibit 2086
`Sonos v. Implicit, IPR2018-0766, -0767
`
`

`

`/Users/implicit/Desktop/Source Code/2001.11.…/…/…/main/sampleclock.c
`Page 6/15
`Saved: 11/9/01, 1:50:18 PM
`Printed for: Implicit
`
`226
`227
`228
`229
`230
`231
`232
`233
`234
`235
`236
`237
`238
`239
`240
`241
`242
`243
`244
`245
`246
`247
`248
`249
`250
`251
`252
`253
`254
`255
`256
`257
`258
`259
`260
`261
`262
`263
`264
`265
`266
`267
`268
`269
`270
`
` }
`
` if (!SOS_SUCCEEDED(status)) {
` *ClockObject = SOS_RegObject_Create(g_SampleClockClass);
` status = SampleClock_NameSet(*ClockObject, Name);
` }
`
` SOS_Lock_Release(g_NamedClockTableLock);
`
` SOS_DEBUGOUT_DETAIL("Created sampleclock %s at %p\n",
` (Name && *Name) ? Name : "<unnamed>",
` *ClockObject
` );
`
` return status;
`}
`
`/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
`CreateFromString Interface
`+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
`
`static
`SOS_STATUS
`SampleClock_CreateFromString (
` SOS_ICREATEFROMSTRING * ICreateFromString,
` const char * String,
` SOS_REGOBJECT ** Object
`)
`{
` SOS_STATUS status = SOS_Success;
`
` SOS_DEBUGOUT_FUNC_TRACE("SampleClock_CreateFromString\n");
`
` if (Object) {
` status = SampleClock_FindOrCreateByName(
` String,
` Object
` );
` } else {
` status = SOS_ErrorParameter;
` }
`
` return status;
`}
`
`Page 6 of 15
`
`Implicit Exhibit 2086
`Sonos v. Implicit, IPR2018-0766, -0767
`
`

`

`/Users/implicit/Desktop/Source Code/2001.11.…/…/…/main/sampleclock.c
`Page 7/15
`Saved: 11/9/01, 1:50:18 PM
`Printed for: Implicit
`
`271
`272
`273
`274
`275
`276
`277
`278
`279
`280
`281
`282
`283
`284
`285
`286
`287
`288
`289
`290
`291
`292
`293
`294
`295
`296
`297
`298
`299
`300
`301
`302
`303
`304
`305
`306
`307
`308
`309
`310
`311
`312
`313
`314
`315
`
`/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
`Copy Interface
`+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
`static
`SOS_STATUS
`SampleClock_Copy (
` SOS_ICOPY * Interface,
` SOS_REGOBJECT ** Copy
`)
`{
` SOS_STATUS status = SOS_Success;
` SOS_REGOBJECT *copy = NULL;
` SAMPLECLOCK *clock = IRESOLVE(Interface);
`
` SOS_DEBUGOUT_DETAIL("SampleClock_Copy\n");
`
` if (clock) {
` if (clock->Name) {
` SOS_DEBUGOUT_DETAIL("SampleClock_Copy references named clock\n");
` /*
` * Named clocks are global (and will probably be deprecated)
` * so we just return a reference.
` */
` copy = SOS_RegObject_Reference(
` SOS_Interface_ObjectPeek(Interface)
` );
` } else {
` SOS_DEBUGOUT_DETAIL("SampleClock_Copy copies unnamed clock\n");
` /*
` * unnamed clocks need to be copied deeply
` */
` copy = SOS_RegObject_Create(g_SampleClockClass);
` if (copy) {
` SAMPLECLOCK *copyClock;
` /*
` * Set everything except the lock
` */
` copyClock = RESOLVE(copy);
` copyClock->Time = clock->Time;
` copyClock->Sample = clock->Sample;
` copyClock->Frequency = clock->Frequency;
` copyClock->Divisor = clock->Divisor;
` copyClock->IsSet = clock->IsSet;
` copyClock->Name = NULL;
`
`Page 7 of 15
`
`Implicit Exhibit 2086
`Sonos v. Implicit, IPR2018-0766, -0767
`
`

`

`/Users/implicit/Desktop/Source Code/2001.11.…/…/…/main/sampleclock.c
`Page 8/15
`Saved: 11/9/01, 1:50:18 PM
`Printed for: Implicit
`
`316
`317
`318
`319
`320
`321
`322
`323
`324
`325
`326
`327
`328
`329
`330
`331
`332
`333
`334
`335
`336
`337
`338
`339
`340
`341
`342
`343
`344
`345
`346
`347
`348
`349
`350
`351
`352
`353
`354
`355
`356
`357
`358
`359
`360
`
` }
` }
` } else {
` status = SOS_ErrorParameter;
` }
`
` if (Copy) {
` *Copy = copy;
` } else {
` SOS_RegObject_Release(copy);
` }
`
` return status;
`}
`
`/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
`SampleClock Interface
`+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
`
`static
`SOS_STATUS
`SampleClock_FrequencySet(
` SOS_ISAMPLECLOCK * Interface,
` SOS_UINT32 Frequency,
` SOS_UINT32 Divisor
`)
`{
` SOS_STATUS status = SOS_Success;
`
` if (!IISVALID(Interface)) {
` /* invalid object */
` status = SOS_ErrorParameter;
` } else if (Divisor==0) {
` /* invalid divisor */
` SOS_ASSERT_ASSUMPTION(
` Divisor!=0,
` "SampleClock_FrequencySet called with Divisor of 0"
` );
` status = SOS_ErrorParameter;
` } else {
` SAMPLECLOCK *sampleclock = IRESOLVE(Interface);
`
` /*
` * We first remove any common factors with no loss of
` * accuracy.
`
`Page 8 of 15
`
`Implicit Exhibit 2086
`Sonos v. Implicit, IPR2018-0766, -0767
`
`

`

`/Users/implicit/Desktop/Source Code/2001.11.…/…/…/main/sampleclock.c
`Page 9/15
`Saved: 11/9/01, 1:50:18 PM
`Printed for: Implicit
`
`361
`362
`363
`364
`365
`366
`367
`368
`369
`370
`371
`372
`373
`374
`375
`376
`377
`378
`379
`380
`381
`382
`383
`384
`385
`386
`387
`388
`389
`390
`391
`392
`393
`394
`395
`396
`397
`398
`399
`400
`401
`402
`403
`404
`405
`
` */
` FactorReduce(&Frequency, &Divisor);
`
` /*
` * If the product of these values is larger than 2^32-1
` * we can get overflows in the epoch calculation. We have to
` * reduce them to make sure that isn't possible.
` *
` * REVISIT - the loss of accuracy here is small, but could still
` * countered for using the same technique we use for the epoch
` * calculations - store the remainder and apply that to the
` * final calculation.
` */
` while (((Frequency*Divisor)/Divisor)!=Frequency) {
` SOS_DEBUGOUT_MINOR_EVENT(
` "Reducing sample clock ratio from %lu/%lu to %lu/%lu to avoid overflow\n",
` Frequency,
` Divisor,
` Frequency>>1,
` Divisor>>1
` );
` Divisor>>=1;
` Frequency>>=1;
` }
` sampleclock->Frequency = Frequency;
` sampleclock->Divisor = Divisor;
` sampleclock->Time = SOS_Clock_TickGet();
` sampleclock->Sample = 0;
`
`
` SOS_ASSERT_ASSUMPTION(
` (Frequency*Divisor)/Divisor==Frequency,
` "Overflow in sample clock values"
` );
`
` }
`
` return status;
`}
`
`static
`SOS_STATUS
`SampleClock_FrequencyGet(
`
`Page 9 of 15
`
`Implicit Exhibit 2086
`Sonos v. Implicit, IPR2018-0766, -0767
`
`

`

`/Users/implicit/Desktop/Source Code/2001.11.…/…/…/main/sampleclock.c
`Page 10/15
`Saved: 11/9/01, 1:50:18 PM
`Printed for: Implicit
`
`406
`407
`408
`409
`410
`411
`412
`413
`414
`415
`416
`417
`418
`419
`420
`421
`422
`423
`424
`425
`426
`427
`428
`429
`430
`431
`432
`433
`434
`435
`436
`437
`438
`439
`440
`441
`442
`443
`444
`445
`446
`447
`448
`449
`450
`
` SOS_ISAMPLECLOCK * Interface,
` SOS_UINT32 * Frequency,
` SOS_UINT32 * Divisor
`)
`{
` SOS_STATUS status = SOS_Success;
`
` if (IISVALID(Interface)) {
` SAMPLECLOCK *sampleclock = IRESOLVE(Interface);
`
` if (Frequency) {
` *Frequency = sampleclock->Frequency;
` }
` if (Divisor) {
` *Divisor = sampleclock->Divisor;
` }
` } else {
` status = SOS_ErrorParameter;
` }
`
` return status;
`}
`
`static
`SOS_STATUS
`SampleClock_Update(
` SOS_ISAMPLECLOCK * Interface,
` SOS_CLOCK_TICK Time,
` SOS_UINT32 Sample
`)
`{
` SOS_STATUS status = SOS_Success;
`
` if (IISVALID(Interface)) {
` SAMPLECLOCK *sampleclock = IRESOLVE(Interface);
`
` SOS_ASSERT_ASSUMPTION(
` Sample==0 || sampleclock->Frequency!=0,
` "Update of improperly initialized clock\n"
` );
`
` SOS_DEBUGOUT_MINOR_EVENT(
` "Updating clock %x to sample %lu at %lu\n",
` Time,
` Sample
`
`Page 10 of 15
`
`Implicit Exhibit 2086
`Sonos v. Implicit, IPR2018-0766, -0767
`
`

`

`/Users/implicit/Desktop/Source Code/2001.11.…/…/…/main/sampleclock.c
`Page 11/15
`Saved: 11/9/01, 1:50:18 PM
`Printed for: Implicit
`
`451
`452
`453
`454
`455
`456
`457
`458
`459
`460
`461
`462
`463
`464
`465
`466
`467
`468
`469
`470
`471
`472
`473
`474
`475
`476
`477
`478
`479
`480
`481
`482
`483
`484
`485
`486
`487
`488
`489
`490
`491
`492
`493
`494
`495
`
` );
`
` /*
` * If the clock hasn't been started we must
` */
` LOCK(sampleclock);
`
` sampleclock->Time = Time;
` sampleclock->Sample = Sample;
` sampleclock->IsSet = SOS_True;
`
` UNLOCK(sampleclock);
`
` } else {
` /* not a valid interface */
` status = SOS_ErrorParameter;
` }
`
` return status;
`}
`
`static
`SOS_STATUS
`SampleClock_EpochGet(
` SOS_ISAMPLECLOCK * Interface,
` SOS_CLOCK_TICK * Epoch
`)
`{
` SOS_CLOCK_TICK epoch = 0;
` SOS_STATUS status = SOS_Success;
`
` if (IISVALID(Interface)) {
` SAMPLECLOCK *sampleclock = IRESOLVE(Interface);
` LOCK(sampleclock);
` if (Epoch) {
` if (!sampleclock->IsSet) {
` SOS_DEBUGOUT_MAJOR_EVENT(
` "Sample clock %p not set\n",
` Interface->Interface.Object
` );
` status = SOS_ErrorParameter;
` } else if (sampleclock->Sample==0 && sampleclock->IsSet) {
` /*
` * Special case - if sample is 0 we don't
`
`Page 11 of 15
`
`Implicit Exhibit 2086
`Sonos v. Implicit, IPR2018-0766, -0767
`
`

`

`/Users/implicit/Desktop/Source Code/2001.11.…/…/…/main/sampleclock.c
`Page 12/15
`Saved: 11/9/01, 1:50:18 PM
`Printed for: Implicit
`
`496
`497
`498
`499
`500
`501
`502
`503
`504
`505
`506
`507
`508
`509
`510
`511
`512
`513
`514
`515
`516
`517
`518
`519
`520
`521
`522
`523
`524
`525
`526
`527
`528
`529
`530
`531
`532
`533
`534
`535
`536
`537
`538
`539
`540
`
` * need to compute the epoch - we know it,
` * and we don't need to even have a frequency
` * and divisor set.
` */
` epoch = sampleclock->Time;
` } else if (sampleclock->Frequency) {
` SOS_UINT32 whole =
` sampleclock->Sample / sampleclock->Frequency;
` SOS_UINT32 remain =
` sampleclock->Sample % sampleclock->Frequency;
` SOS_UINT32 delta = whole * sampleclock->Divisor +
` remain * sampleclock->Divisor / sampleclock->Frequency;
` epoch = sampleclock->Time - delta;
`
` SOS_DEBUGOUT_MINOR_EVENT(
` "SampleClock %lu/%lu %lu@%lu Epoch %lu\n",
` sampleclock->Frequency,
` sampleclock->Divisor,
` sampleclock->Sample,
` sampleclock->Time,
` epoch
` );
`
` } else {
` /* Frequency is 0 - or unspecified, and Sample!=0 */
` SOS_DEBUGOUT_MAJOR_EVENT(
` "Sample clock frequency not set\n"
` );
` status = SOS_ErrorParameter;
` }
` } else {
` /* out parameter is 0 */
` status = SOS_ErrorParameter;
` }
` UNLOCK(sampleclock);
` } else {
` /* not a valid interface */
` status = SOS_ErrorParameter;
` }
`
` if (Epoch) {
` *Epoch = epoch;
` }
`
` SOS_DEBUGOUT_FUNC_TRACE(
`
`Page 12 of 15
`
`Implicit Exhibit 2086
`Sonos v. Implicit, IPR2018-0766, -0767
`
`

`

`/Users/implicit/Desktop/Source Code/2001.11.…/…/…/main/sampleclock.c
`Page 13/15
`Saved: 11/9/01, 1:50:18 PM
`Printed for: Implicit
`
`541
`542
`543
`544
`545
`546
`547
`548
`549
`550
`551
`552
`553
`554
`555
`556
`557
`558
`559
`560
`561
`562
`563
`564
`565
`566
`567
`568
`569
`570
`571
`572
`573
`574
`575
`576
`577
`578
`579
`580
`581
`582
`583
`584
`585
`
` "EpochGet returns %d\n",
` status);
`
` return status;
`}
`
`/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
`Global initialization
`+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
`static
`SOS_STATUS
`SampleClock_ClassInit (
` SOS_REGOBJECTCLASS *RegObjectClass,
` SOS_REGOBJECT *InitContext
`)
`{
` SOS_STATUS status = SOS_Success;
`
` static const SOS_ISAMPLECLOCK iSampleClock = {
` SOS_INTERFACE_INIT,
` SampleClock_FrequencySet,
` SampleClock_FrequencyGet,
` SampleClock_Update,
` SampleClock_EpochGet
` };
`
` static const SOS_ICREATEFROMSTRING iCreateFromString = {
` SOS_INTERFACE_INIT,
` SampleClock_CreateFromString
` };
`
` static const SOS_ICOPY iCopy = {
` SOS_INTERFACE_INIT,
` SampleClock_Copy,
` SampleClock_Copy
` };
`
` g_SampleClockClass = SOS_RegObjectClass_Reference(RegObjectClass);
`
` status = SOS_RegObjectClass_InterfaceAdd(
` g_SampleClockClass,
` SOS_ISAMPLECLOCK_ID,
` &iSampleClock,
` sizeof(iSampleClock)
`
`Page 13 of 15
`
`Implicit Exhibit 2086
`Sonos v. Implicit, IPR2018-0766, -0767
`
`

`

`/Users/implicit/Desktop/Source Code/2001.11.…/…/…/main/sampleclock.c
`Page 14/15
`Saved: 11/9/01, 1:50:18 PM
`Printed for: Implicit
`
`586
`587
`588
`589
`590
`591
`592
`593
`594
`595
`596
`597
`598
`599
`600
`601
`602
`603
`604
`605
`606
`607
`608
`609
`610
`611
`612
`613
`614
`615
`616
`617
`618
`619
`620
`621
`622
`623
`624
`625
`626
`627
`628
`629
`630
`
` );
`
` status = SOS_RegObjectClass_ClassInterfaceAdd(
` g_SampleClockClass,
` SOS_ICREATEFROMSTRING_ID,
` &iCreateFromString,
` sizeof(iCreateFromString)
` );
`
` SOS_RegObjectClass_InterfaceAdd (
` g_SampleClockClass,
` SOS_ICOPY_ID,
` &iCopy,
` sizeof(iCopy)
` );
`
` SOS_Registry_SchemeRegister(
` g_SampleClockClass,
` SAMPLECLOCK_SCHEME_NAME
` );
`
` g_NamedClockTable = SOS_StringTable_Create(NULL,NULL,NULL);
` g_NamedClockTableLock = SOS_Lock_Create();
`
` return status;
`}
`
`static
`SOS_STATUS
`SampleClock_ClassUninit(
` SOS_REGOBJECTCLASS *RegObjectClass
`)
`{
` SOS_StringTable_Destroy(g_NamedClockTable);
` g_NamedClockTable = NULL;
` SOS_Lock_Destroy(g_NamedClockTableLock);
` g_NamedClockTableLock = NULL;
`
` SOS_Registry_SchemeUnregister(
` g_SampleClockClass,
` SAMPLECLOCK_SCHEME_NAME
` );
`
` SOS_RegObjectClass_Release(g_SampleClockClass);
`
`Page 14 of 15
`
`Implicit Exhibit 2086
`Sonos v. Implicit, IPR2018-0766, -0767
`
`

`

`/Users/implicit/Desktop/Source Code/2001.11.…/…/…/main/sampleclock.c
`Page 15/15
`Saved: 11/9/01, 1:50:18 PM
`Printed for: Implicit
`
` return SOS_Success;
`}
`
`SOS_STATUS
`SOS_ModuleInit(
` SOS_OBJECTFILE* ObjectFile,
` SOS_REGOBJECT* RegistryHandle
`)
`{
` SOS_REGOBJECTCLASS *class = SOS_RegObjectClass_Register(
` ObjectFile,
` SAMPLECLOCK_CLASS_NAME,
` NULL, /* class context */
` SampleClock_ClassInit,
` SampleClock_ClassUninit,
` SampleClock_Init,
` SampleClock_Uninit
` );
`
` /*
` * Immediately release this class.
` * It may not be returned in future versions.
` */
` SOS_RegObjectClass_Release(class);
`
` return SOS_Success;
`}
`
`void
`SOS_ModuleUninit(
` SOS_OBJECTFILE* ObjectFile
`)
`{
`}
`
`631
`632
`633
`634
`635
`636
`637
`638
`639
`640
`641
`642
`643
`644
`645
`646
`647
`648
`649
`650
`651
`652
`653
`654
`655
`656
`657
`658
`659
`660
`661
`662
`663
`664
`665
`666
`667
`668
`669
`670
`
`Page 15 of 15
`
`Implicit Exhibit 2086
`Sonos v. Implicit, IPR2018-0766, -0767
`
`

This document is available on Docket Alarm but you must sign up to view it.


Or .

Accessing this document will incur an additional charge of $.

After purchase, you can access this document again without charge.

Accept $ Charge
throbber

Still Working On It

This document is taking longer than usual to download. This can happen if we need to contact the court directly to obtain the document and their servers are running slowly.

Give it another minute or two to complete, and then try the refresh button.

throbber

A few More Minutes ... Still Working

It can take up to 5 minutes for us to download a document if the court servers are running slowly.

Thank you for your continued patience.

This document could not be displayed.

We could not find this document within its docket. Please go back to the docket page and check the link. If that does not work, go back to the docket and refresh it to pull the newest information.

Your account does not support viewing this document.

You need a Paid Account to view this document. Click here to change your account type.

Your account does not support viewing this document.

Set your membership status to view this document.

With a Docket Alarm membership, you'll get a whole lot more, including:

  • Up-to-date information for this case.
  • Email alerts whenever there is an update.
  • Full text search for other cases.
  • Get email alerts whenever a new case matches your search.

Become a Member

One Moment Please

The filing “” is large (MB) and is being downloaded.

Please refresh this page in a few minutes to see if the filing has been downloaded. The filing will also be emailed to you when the download completes.

Your document is on its way!

If you do not receive the document in five minutes, contact support at support@docketalarm.com.

Sealed Document

We are unable to display this document, it may be under a court ordered seal.

If you have proper credentials to access the file, you may proceed directly to the court's system using your government issued username and password.


Access Government Site

We are redirecting you
to a mobile optimized page.





Document Unreadable or Corrupt

Refresh this Document
Go to the Docket

We are unable to display this document.

Refresh this Document
Go to the Docket