@@ -259,3 +259,30 @@ func TestHybridAudioDescriptorLayouts(t *testing.T) {
259259 t .Fatalf ("plaintext streamConnections encryption flag = %#v, want false" , rtp ["streamConnectionKeyUseStreamEncryptionKey" ])
260260 }
261261}
262+
263+ func TestSamsungAU9000TimingException (t * testing.T ) {
264+ for _ , test := range []struct {
265+ name , model , version , want string
266+ }{
267+ {"observed receiver" , "UAU9000" , "377.25.06" , timingProtocolNTP },
268+ {"different model" , "another model" , "377.25.06" , timingProtocolPTP },
269+ {"missing model" , "" , "377.25.06" , timingProtocolPTP },
270+ {"different version" , "UAU9000" , "377.25.07" , timingProtocolPTP },
271+ } {
272+ t .Run (test .name , func (t * testing.T ) {
273+ info := receiverWithFeatures (featurePTP , featureAudioStreamConnectionSetup )
274+ info .SourceVersion = test .version
275+ baseline := mustCompatibility (t , & info , true )
276+ info .Model = test .model
277+ got := mustCompatibility (t , & info , true )
278+ if got .timing != test .want {
279+ t .Fatalf ("timing = %q, want %q" , got .timing , test .want )
280+ }
281+ // The quirk must not change audio negotiation or key placement.
282+ got .timing = baseline .timing
283+ if ! reflect .DeepEqual (got , baseline ) {
284+ t .Fatalf ("timing exception changed another policy field: got %+v, want %+v" , got , baseline )
285+ }
286+ })
287+ }
288+ }
0 commit comments