@@ -264,24 +264,6 @@ static const struct snd_soc_acpi_adr_device cs35l56_3_3amp_adr[] = {
264264 }
265265};
266266
267- static const struct snd_soc_acpi_adr_device cs42l43_3_adr [] = {
268- {
269- .adr = 0x00033001FA424301ull ,
270- .num_endpoints = ARRAY_SIZE (cs42l43_endpoints ),
271- .endpoints = cs42l43_endpoints ,
272- .name_prefix = "cs42l43"
273- }
274- };
275-
276- static const struct snd_soc_acpi_adr_device rt711_sdca_0_adr [] = {
277- {
278- .adr = 0x000030025D071101ull ,
279- .num_endpoints = 1 ,
280- .endpoints = & single_endpoint ,
281- .name_prefix = "rt711"
282- }
283- };
284-
285267static const struct snd_soc_acpi_adr_device rt712_vb_2_group1_adr [] = {
286268 {
287269 .adr = 0x000230025D071201ull ,
@@ -318,51 +300,6 @@ static const struct snd_soc_acpi_adr_device rt713_vb_3_adr[] = {
318300 }
319301};
320302
321- static const struct snd_soc_acpi_adr_device rt721_3_single_adr [] = {
322- {
323- .adr = 0x000330025d072101ull ,
324- .num_endpoints = ARRAY_SIZE (rt_mf_endpoints ),
325- .endpoints = rt_mf_endpoints ,
326- .name_prefix = "rt721"
327- }
328- };
329-
330- static const struct snd_soc_acpi_link_adr ptl_rt721_l3 [] = {
331- {
332- .mask = BIT (3 ),
333- .num_adr = ARRAY_SIZE (rt721_3_single_adr ),
334- .adr_d = rt721_3_single_adr ,
335- },
336- {},
337- };
338-
339- static const struct snd_soc_acpi_adr_device rt722_0_single_adr [] = {
340- {
341- .adr = 0x000030025d072201ull ,
342- .num_endpoints = ARRAY_SIZE (rt_mf_endpoints ),
343- .endpoints = rt_mf_endpoints ,
344- .name_prefix = "rt722"
345- }
346- };
347-
348- static const struct snd_soc_acpi_adr_device rt722_1_single_adr [] = {
349- {
350- .adr = 0x000130025d072201ull ,
351- .num_endpoints = ARRAY_SIZE (rt_mf_endpoints ),
352- .endpoints = rt_mf_endpoints ,
353- .name_prefix = "rt722"
354- }
355- };
356-
357- static const struct snd_soc_acpi_adr_device rt722_3_single_adr [] = {
358- {
359- .adr = 0x000330025d072201ull ,
360- .num_endpoints = ARRAY_SIZE (rt_mf_endpoints ),
361- .endpoints = rt_mf_endpoints ,
362- .name_prefix = "rt722"
363- }
364- };
365-
366303static const struct snd_soc_acpi_adr_device rt1320_1_group1_adr [] = {
367304 {
368305 .adr = 0x000130025D132001ull ,
@@ -408,67 +345,58 @@ static const struct snd_soc_acpi_adr_device rt1320_3_group2_adr[] = {
408345 }
409346};
410347
411- static const struct snd_soc_acpi_link_adr ptl_cs42l43_l2_cs35l56x6_l13 [] = {
412- {
413- .mask = BIT (2 ),
414- .num_adr = ARRAY_SIZE (cs42l43_2_adr ),
415- .adr_d = cs42l43_2_adr ,
416- },
417- {
418- .mask = BIT (1 ),
419- .num_adr = ARRAY_SIZE (cs35l56_1_3amp_adr ),
420- .adr_d = cs35l56_1_3amp_adr ,
421- },
348+ static const struct snd_soc_acpi_adr_device rt722_0_single_adr [] = {
422349 {
423- .mask = BIT ( 3 ) ,
424- .num_adr = ARRAY_SIZE (cs35l56_3_3amp_adr ),
425- .adr_d = cs35l56_3_3amp_adr ,
426- },
427- { }
350+ .adr = 0x000030025d072201ull ,
351+ .num_endpoints = ARRAY_SIZE (rt_mf_endpoints ),
352+ .endpoints = rt_mf_endpoints ,
353+ . name_prefix = "rt722"
354+ }
428355};
429356
430- static const struct snd_soc_acpi_link_adr ptl_cs42l43_l3 [] = {
357+ static const struct snd_soc_acpi_adr_device rt722_1_single_adr [] = {
431358 {
432- .mask = BIT (3 ),
433- .num_adr = ARRAY_SIZE (cs42l43_3_adr ),
434- .adr_d = cs42l43_3_adr ,
359+ .adr = 0x000130025d072201ull ,
360+ .num_endpoints = ARRAY_SIZE (rt_mf_endpoints ),
361+ .endpoints = rt_mf_endpoints ,
362+ .name_prefix = "rt722"
435363 }
436364};
437365
438- static const struct snd_soc_acpi_link_adr ptl_rt722_only [] = {
366+ static const struct snd_soc_acpi_adr_device cs42l43_3_adr [] = {
439367 {
440- .mask = BIT ( 0 ) ,
441- .num_adr = ARRAY_SIZE (rt722_0_single_adr ),
442- .adr_d = rt722_0_single_adr ,
443- },
444- { }
368+ .adr = 0x00033001FA424301ull ,
369+ .num_endpoints = ARRAY_SIZE (cs42l43_endpoints ),
370+ .endpoints = cs42l43_endpoints ,
371+ . name_prefix = "cs42l43"
372+ }
445373};
446374
447- static const struct snd_soc_acpi_link_adr ptl_rt722_l1 [] = {
375+ static const struct snd_soc_acpi_adr_device rt721_3_single_adr [] = {
448376 {
449- .mask = BIT ( 1 ) ,
450- .num_adr = ARRAY_SIZE (rt722_1_single_adr ),
451- .adr_d = rt722_1_single_adr ,
452- },
453- { }
377+ .adr = 0x000330025d072101ull ,
378+ .num_endpoints = ARRAY_SIZE (rt_mf_endpoints ),
379+ .endpoints = rt_mf_endpoints ,
380+ . name_prefix = "rt721"
381+ }
454382};
455383
456- static const struct snd_soc_acpi_link_adr ptl_rt722_l3 [] = {
384+ static const struct snd_soc_acpi_adr_device rt722_3_single_adr [] = {
457385 {
458- .mask = BIT ( 3 ) ,
459- .num_adr = ARRAY_SIZE (rt722_3_single_adr ),
460- .adr_d = rt722_3_single_adr ,
461- },
462- { }
386+ .adr = 0x000330025d072201ull ,
387+ .num_endpoints = ARRAY_SIZE (rt_mf_endpoints ),
388+ .endpoints = rt_mf_endpoints ,
389+ . name_prefix = "rt722"
390+ }
463391};
464392
465- static const struct snd_soc_acpi_link_adr ptl_rvp [] = {
393+ static const struct snd_soc_acpi_adr_device rt711_sdca_0_adr [] = {
466394 {
467- .mask = BIT ( 0 ) ,
468- .num_adr = ARRAY_SIZE ( rt711_sdca_0_adr ) ,
469- .adr_d = rt711_sdca_0_adr ,
470- },
471- { }
395+ .adr = 0x000030025D071101ull ,
396+ .num_endpoints = 1 ,
397+ .endpoints = & single_endpoint ,
398+ . name_prefix = "rt711"
399+ }
472400};
473401
474402static const struct snd_soc_acpi_link_adr ptl_sdw_rt713_vb_l2_rt1320_l13 [] = {
@@ -509,6 +437,25 @@ static const struct snd_soc_acpi_link_adr ptl_sdw_rt713_vb_l3_rt1320_l12[] = {
509437 {}
510438};
511439
440+ static const struct snd_soc_acpi_link_adr ptl_cs42l43_l2_cs35l56x6_l13 [] = {
441+ {
442+ .mask = BIT (2 ),
443+ .num_adr = ARRAY_SIZE (cs42l43_2_adr ),
444+ .adr_d = cs42l43_2_adr ,
445+ },
446+ {
447+ .mask = BIT (1 ),
448+ .num_adr = ARRAY_SIZE (cs35l56_1_3amp_adr ),
449+ .adr_d = cs35l56_1_3amp_adr ,
450+ },
451+ {
452+ .mask = BIT (3 ),
453+ .num_adr = ARRAY_SIZE (cs35l56_3_3amp_adr ),
454+ .adr_d = cs35l56_3_3amp_adr ,
455+ },
456+ {}
457+ };
458+
512459static const struct snd_soc_acpi_link_adr ptl_sdw_rt712_vb_l2_rt1320_l1 [] = {
513460 {
514461 .mask = BIT (2 ),
@@ -537,15 +484,62 @@ static const struct snd_soc_acpi_link_adr ptl_sdw_rt712_vb_l3_rt1320_l2[] = {
537484 {}
538485};
539486
540- /* this table is used when there is no I2S codec present */
541- struct snd_soc_acpi_mach snd_soc_acpi_intel_ptl_sdw_machines [] = {
542- /* mockup tests need to be first */
487+ static const struct snd_soc_acpi_link_adr ptl_rvp [] = {
543488 {
544- .link_mask = GENMASK (3 , 0 ),
545- .links = sdw_mockup_headset_2amps_mic ,
546- .drv_name = "sof_sdw" ,
547- .sof_tplg_filename = "sof-ptl-rt711-rt1308-rt715.tplg" ,
489+ .mask = BIT (0 ),
490+ .num_adr = ARRAY_SIZE (rt711_sdca_0_adr ),
491+ .adr_d = rt711_sdca_0_adr ,
548492 },
493+ {}
494+ };
495+
496+ static const struct snd_soc_acpi_link_adr ptl_rt722_only [] = {
497+ {
498+ .mask = BIT (0 ),
499+ .num_adr = ARRAY_SIZE (rt722_0_single_adr ),
500+ .adr_d = rt722_0_single_adr ,
501+ },
502+ {}
503+ };
504+
505+ static const struct snd_soc_acpi_link_adr ptl_rt722_l1 [] = {
506+ {
507+ .mask = BIT (1 ),
508+ .num_adr = ARRAY_SIZE (rt722_1_single_adr ),
509+ .adr_d = rt722_1_single_adr ,
510+ },
511+ {}
512+ };
513+
514+ static const struct snd_soc_acpi_link_adr ptl_cs42l43_l3 [] = {
515+ {
516+ .mask = BIT (3 ),
517+ .num_adr = ARRAY_SIZE (cs42l43_3_adr ),
518+ .adr_d = cs42l43_3_adr ,
519+ }
520+ };
521+
522+ static const struct snd_soc_acpi_link_adr ptl_rt721_l3 [] = {
523+ {
524+ .mask = BIT (3 ),
525+ .num_adr = ARRAY_SIZE (rt721_3_single_adr ),
526+ .adr_d = rt721_3_single_adr ,
527+ },
528+ {},
529+ };
530+
531+ static const struct snd_soc_acpi_link_adr ptl_rt722_l3 [] = {
532+ {
533+ .mask = BIT (3 ),
534+ .num_adr = ARRAY_SIZE (rt722_3_single_adr ),
535+ .adr_d = rt722_3_single_adr ,
536+ },
537+ {}
538+ };
539+
540+ /* this table is used when there is no I2S codec present */
541+ struct snd_soc_acpi_mach snd_soc_acpi_intel_ptl_sdw_machines [] = {
542+ /* Priority: mockup > most links > most bit link-mask > alphabetical */
549543 {
550544 .link_mask = BIT (0 ) | BIT (1 ) | BIT (3 ),
551545 .links = sdw_mockup_headset_1amp_mic ,
@@ -559,10 +553,10 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_ptl_sdw_machines[] = {
559553 .sof_tplg_filename = "sof-ptl-rt715-rt711-rt1308-mono.tplg" ,
560554 },
561555 {
562- .link_mask = BIT ( 1 ) | BIT ( 2 ) | BIT ( 3 ),
563- .links = ptl_cs42l43_l2_cs35l56x6_l13 ,
556+ .link_mask = GENMASK ( 3 , 0 ),
557+ .links = sdw_mockup_headset_2amps_mic ,
564558 .drv_name = "sof_sdw" ,
565- .sof_tplg_filename = "sof-ptl-cs42l43-l2-cs35l56x6-l13 .tplg" ,
559+ .sof_tplg_filename = "sof-ptl-rt711-rt1308-rt715 .tplg" ,
566560 },
567561 {
568562 .link_mask = BIT (0 ),
@@ -571,25 +565,47 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_ptl_sdw_machines[] = {
571565 .sof_tplg_filename = "sof-ptl-rt722.tplg" , /* Reuse the existing tplg file */
572566 },
573567 {
574- .link_mask = BIT (0 ),
575- .links = ptl_rvp ,
568+ .link_mask = BIT (1 ) | BIT ( 2 ) | BIT ( 3 ),
569+ .links = ptl_sdw_rt713_vb_l2_rt1320_l13 ,
576570 .drv_name = "sof_sdw" ,
577- .sof_tplg_filename = "sof-ptl-rt711.tplg" ,
571+ .machine_check = snd_soc_acpi_intel_sdca_is_device_rt712_vb ,
572+ .sof_tplg_filename = "sof-ptl-rt713-l2-rt1320-l13.tplg" ,
573+ .get_function_tplg_files = sof_sdw_get_tplg_files ,
578574 },
579575 {
580- .link_mask = BIT (3 ),
581- .links = ptl_cs42l43_l3 ,
576+ .link_mask = BIT (1 ) | BIT ( 2 ) | BIT ( 3 ),
577+ .links = ptl_sdw_rt713_vb_l3_rt1320_l12 ,
582578 .drv_name = "sof_sdw" ,
583- .sof_tplg_filename = "sof-ptl-cs42l43-l3.tplg" ,
584- .get_function_tplg_files = sof_sdw_get_tplg_files ,
579+ .machine_check = snd_soc_acpi_intel_sdca_is_device_rt712_vb ,
580+ .sof_tplg_filename = "sof-ptl-rt713-l3-rt1320-l12.tplg"
581+ },
582+ {
583+ .link_mask = BIT (1 ) | BIT (2 ) | BIT (3 ),
584+ .links = ptl_cs42l43_l2_cs35l56x6_l13 ,
585+ .drv_name = "sof_sdw" ,
586+ .sof_tplg_filename = "sof-ptl-cs42l43-l2-cs35l56x6-l13.tplg" ,
585587 },
586588 {
587- .link_mask = BIT (3 ),
588- .links = ptl_rt721_l3 ,
589+ .link_mask = BIT (1 ) | BIT ( 2 ),
590+ .links = ptl_sdw_rt712_vb_l2_rt1320_l1 ,
589591 .drv_name = "sof_sdw" ,
590- .sof_tplg_filename = "sof-ptl-rt721.tplg" ,
592+ .machine_check = snd_soc_acpi_intel_sdca_is_device_rt712_vb ,
593+ .sof_tplg_filename = "sof-ptl-rt712-l2-rt1320-l1.tplg" ,
591594 .get_function_tplg_files = sof_sdw_get_tplg_files ,
592595 },
596+ {
597+ .link_mask = BIT (2 ) | BIT (3 ),
598+ .links = ptl_sdw_rt712_vb_l3_rt1320_l2 ,
599+ .drv_name = "sof_sdw" ,
600+ .machine_check = snd_soc_acpi_intel_sdca_is_device_rt712_vb ,
601+ .sof_tplg_filename = "sof-ptl-rt712-l3-rt1320-l2.tplg"
602+ },
603+ {
604+ .link_mask = BIT (0 ),
605+ .links = ptl_rvp ,
606+ .drv_name = "sof_sdw" ,
607+ .sof_tplg_filename = "sof-ptl-rt711.tplg" ,
608+ },
593609 {
594610 .link_mask = BIT (0 ),
595611 .links = ptl_rt722_only ,
@@ -606,41 +622,25 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_ptl_sdw_machines[] = {
606622 },
607623 {
608624 .link_mask = BIT (3 ),
609- .links = ptl_rt722_l3 ,
625+ .links = ptl_cs42l43_l3 ,
610626 .drv_name = "sof_sdw" ,
611- .sof_tplg_filename = "sof-ptl-rt722 .tplg" ,
627+ .sof_tplg_filename = "sof-ptl-cs42l43-l3 .tplg" ,
612628 .get_function_tplg_files = sof_sdw_get_tplg_files ,
613629 },
614630 {
615- .link_mask = BIT (1 ) | BIT ( 2 ),
616- .links = ptl_sdw_rt712_vb_l2_rt1320_l1 ,
631+ .link_mask = BIT (3 ),
632+ .links = ptl_rt721_l3 ,
617633 .drv_name = "sof_sdw" ,
618- .machine_check = snd_soc_acpi_intel_sdca_is_device_rt712_vb ,
619- .sof_tplg_filename = "sof-ptl-rt712-l2-rt1320-l1.tplg" ,
634+ .sof_tplg_filename = "sof-ptl-rt721.tplg" ,
620635 .get_function_tplg_files = sof_sdw_get_tplg_files ,
621636 },
622637 {
623- .link_mask = BIT (2 ) | BIT (3 ),
624- .links = ptl_sdw_rt712_vb_l3_rt1320_l2 ,
625- .drv_name = "sof_sdw" ,
626- .machine_check = snd_soc_acpi_intel_sdca_is_device_rt712_vb ,
627- .sof_tplg_filename = "sof-ptl-rt712-l3-rt1320-l2.tplg"
628- },
629- {
630- .link_mask = BIT (1 ) | BIT (2 ) | BIT (3 ),
631- .links = ptl_sdw_rt713_vb_l2_rt1320_l13 ,
638+ .link_mask = BIT (3 ),
639+ .links = ptl_rt722_l3 ,
632640 .drv_name = "sof_sdw" ,
633- .machine_check = snd_soc_acpi_intel_sdca_is_device_rt712_vb ,
634- .sof_tplg_filename = "sof-ptl-rt713-l2-rt1320-l13.tplg" ,
641+ .sof_tplg_filename = "sof-ptl-rt722.tplg" ,
635642 .get_function_tplg_files = sof_sdw_get_tplg_files ,
636643 },
637- {
638- .link_mask = BIT (1 ) | BIT (2 ) | BIT (3 ),
639- .links = ptl_sdw_rt713_vb_l3_rt1320_l12 ,
640- .drv_name = "sof_sdw" ,
641- .machine_check = snd_soc_acpi_intel_sdca_is_device_rt712_vb ,
642- .sof_tplg_filename = "sof-ptl-rt713-l3-rt1320-l12.tplg"
643- },
644644 {},
645645};
646646EXPORT_SYMBOL_GPL (snd_soc_acpi_intel_ptl_sdw_machines );
0 commit comments