Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/39694 )
Change subject: include/device/azalia: Add enums and MACROs ......................................................................
include/device/azalia: Add enums and MACROs
Instead of only using magic values add enums and defines to allow writing the codec init sequence in human readable form.
Change-Id: Icad07c2b550657b879ad9328a70ba44629a0c939 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/include/device/azalia_device.h 1 file changed, 88 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/94/39694/1
diff --git a/src/include/device/azalia_device.h b/src/include/device/azalia_device.h index 00899f3..5a37b65 100644 --- a/src/include/device/azalia_device.h +++ b/src/include/device/azalia_device.h @@ -28,6 +28,94 @@ extern const u32 pc_beep_verbs[]; extern const u32 pc_beep_verbs_size;
+enum azalia_pin_connection { + JACK = 0, + NC, + INTEGRATED, + JACK_AND_INTEGRATED, +}; + +enum azalia_pin_color { + COLOR_UNKNOWN = 0, + BLACK, + GREY, + BLUE, + GREEN, + RED, + ORANGE, + YELLOW, + PURPLE, + PINK, + WHITE = 0xe, + COLOR_OTHER = 0xf, +}; + +enum azalia_pin_type { + TYPE_UNKNOWN = 0, + STEREO_MONO_1_8, + STEREO_MONO_1_4, + ATAPI, + RCA, + OPTIONAL, + OTHER_DIGITAL, + OTHER_ANALOG, + MULTICHANNEL_ANALOG, + XLR, + RJ_11, + COMBINATION, + TYPE_OTHER = 0xf +}; + +enum azalia_pin_device { + LINE_OUT = 0, + SPEAKER, + HP_OUT, + CD, + SPDIF_OUT, + DIGITAL_OTHER_OUT, + MODEM_LINE_SIDE, + MODEM_HANDSET_SIDE, + LINE_IN, + AUX, + MIC_IN, + TELEPHONY, + SPDIF_IN, + DIGITAL_OTHER_IN, + DEVICE_OTHER = 0xf, +}; + +enum azalia_pin_location_1 { + NA = 0, + REAR, + FRONT, + LEFT, + RIGHT, + TOP, + BOTTOM, + SPECIAL7, + SPECIAL8, + SPECIAL9, +}; + +enum azalia_pin_location_2 { + EXTERNAL_PRIMARY_CHASSIS = 0, + INTERNAL, + SEPARATE_CHASSIS, + LOCATION_OTHER +}; + +#define AZALIA_PIN_DESC(conn, location2, location1, dev, type, color, no_presence_detect, \ + association, sequence) \ + (((conn) << 30) | \ + ((location2) << 27) | \ + ((location1) << 24) | \ + ((dev) << 20) | \ + ((type) << 16) | \ + ((color) << 12) | \ + ((no_presence_detect) << 8) | \ + ((sequence) << 4) | \ + ((sequence) << 0)) + #define AZALIA_ARRAY_SIZES const u32 pc_beep_verbs_size = \ ARRAY_SIZE(pc_beep_verbs); \ const u32 cim_verb_data_size = sizeof(cim_verb_data)
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39694 )
Change subject: include/device/azalia: Add enums and MACROs ......................................................................
Patch Set 1: Code-Review+1
Nice.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39694 )
Change subject: include/device/azalia: Add enums and MACROs ......................................................................
Patch Set 1: Code-Review+1
(2 comments)
https://review.coreboot.org/c/coreboot/+/39694/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/39694/1//COMMIT_MSG@9 PS1, Line 9: writing This should be on the next line
https://review.coreboot.org/c/coreboot/+/39694/1/src/include/device/azalia_d... File src/include/device/azalia_device.h:
https://review.coreboot.org/c/coreboot/+/39694/1/src/include/device/azalia_d... PS1, Line 116: sequence Did you mean `association` ?
Hello build bot (Jenkins), Paul Menzel, Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39694
to look at the new patch set (#2).
Change subject: include/device/azalia: Add enums and MACROs ......................................................................
include/device/azalia: Add enums and MACROs
Instead of only using magic values add enums and defines to allow writing the codec init sequence in human readable form.
Change-Id: Icad07c2b550657b879ad9328a70ba44629a0c939 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/include/device/azalia_device.h 1 file changed, 88 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/94/39694/2
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39694 )
Change subject: include/device/azalia: Add enums and MACROs ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/39694/1/src/include/device/azalia_d... File src/include/device/azalia_device.h:
https://review.coreboot.org/c/coreboot/+/39694/1/src/include/device/azalia_d... PS1, Line 116: sequence
Did you mean `association` ?
Done
Duncan Laurie has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39694 )
Change subject: include/device/azalia: Add enums and MACROs ......................................................................
Patch Set 2: Code-Review+2
Christian Walter has uploaded a new patch set (#3) to the change originally created by Patrick Rudolph. ( https://review.coreboot.org/c/coreboot/+/39694 )
Change subject: include/device/azalia: Add enums and MACROs ......................................................................
include/device/azalia: Add enums and MACROs
Instead of only using magic values add enums and defines to allow writing the codec init sequence in human readable form.
Change-Id: Icad07c2b550657b879ad9328a70ba44629a0c939 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/include/device/azalia_device.h 1 file changed, 88 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/94/39694/3
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39694 )
Change subject: include/device/azalia: Add enums and MACROs ......................................................................
Patch Set 3: Code-Review+1
(1 comment)
https://review.coreboot.org/c/coreboot/+/39694/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/39694/1//COMMIT_MSG@9 PS1, Line 9: writing
This should be on the next line
Poke
Christian Walter has uploaded a new patch set (#5) to the change originally created by Patrick Rudolph. ( https://review.coreboot.org/c/coreboot/+/39694 )
Change subject: include/device/azalia: Add enums and MACROs ......................................................................
include/device/azalia: Add enums and MACROs
Instead of only using magic values add enums and defines to allow writing the codec init sequence in human readable form.
Change-Id: Icad07c2b550657b879ad9328a70ba44629a0c939 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/include/device/azalia_device.h 1 file changed, 88 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/94/39694/5
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39694 )
Change subject: include/device/azalia: Add enums and MACROs ......................................................................
Patch Set 5:
(1 comment)
https://review.coreboot.org/c/coreboot/+/39694/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/39694/1//COMMIT_MSG@9 PS1, Line 9: writing
Done
Not done
Hello build bot (Jenkins), Christian Walter, Duncan Laurie, Paul Menzel, Angel Pons, Marcello Sylvester Bauer,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/39694
to look at the new patch set (#6).
Change subject: include/device/azalia: Add enums and MACROs ......................................................................
include/device/azalia: Add enums and MACROs
Instead of only using magic values add enums and defines to allow writing the codec init sequence in human readable form.
This will replace the magic numbers in mainboards HDA verb tables.
Change-Id: Icad07c2b550657b879ad9328a70ba44629a0c939 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/include/device/azalia_device.h 1 file changed, 88 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/94/39694/6
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39694 )
Change subject: include/device/azalia: Add enums and MACROs ......................................................................
Patch Set 5:
(1 comment)
https://review.coreboot.org/c/coreboot/+/39694/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/39694/1//COMMIT_MSG@9 PS1, Line 9: writing
Not done
Done
Duncan Laurie has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39694 )
Change subject: include/device/azalia: Add enums and MACROs ......................................................................
Patch Set 6: Code-Review+2
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39694 )
Change subject: include/device/azalia: Add enums and MACROs ......................................................................
Patch Set 6: Code-Review+2
Angel Pons has submitted this change. ( https://review.coreboot.org/c/coreboot/+/39694 )
Change subject: include/device/azalia: Add enums and MACROs ......................................................................
include/device/azalia: Add enums and MACROs
Instead of only using magic values add enums and defines to allow writing the codec init sequence in human readable form.
This will replace the magic numbers in mainboards HDA verb tables.
Change-Id: Icad07c2b550657b879ad9328a70ba44629a0c939 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/39694 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Duncan Laurie dlaurie@chromium.org Reviewed-by: Angel Pons th3fanbus@gmail.com --- M src/include/device/azalia_device.h 1 file changed, 88 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Duncan Laurie: Looks good to me, approved Angel Pons: Looks good to me, approved
diff --git a/src/include/device/azalia_device.h b/src/include/device/azalia_device.h index 6f82e0e..3c8e76e 100644 --- a/src/include/device/azalia_device.h +++ b/src/include/device/azalia_device.h @@ -17,6 +17,94 @@ extern const u32 pc_beep_verbs[]; extern const u32 pc_beep_verbs_size;
+enum azalia_pin_connection { + JACK = 0, + NC, + INTEGRATED, + JACK_AND_INTEGRATED, +}; + +enum azalia_pin_color { + COLOR_UNKNOWN = 0, + BLACK, + GREY, + BLUE, + GREEN, + RED, + ORANGE, + YELLOW, + PURPLE, + PINK, + WHITE = 0xe, + COLOR_OTHER = 0xf, +}; + +enum azalia_pin_type { + TYPE_UNKNOWN = 0, + STEREO_MONO_1_8, + STEREO_MONO_1_4, + ATAPI, + RCA, + OPTIONAL, + OTHER_DIGITAL, + OTHER_ANALOG, + MULTICHANNEL_ANALOG, + XLR, + RJ_11, + COMBINATION, + TYPE_OTHER = 0xf +}; + +enum azalia_pin_device { + LINE_OUT = 0, + SPEAKER, + HP_OUT, + CD, + SPDIF_OUT, + DIGITAL_OTHER_OUT, + MODEM_LINE_SIDE, + MODEM_HANDSET_SIDE, + LINE_IN, + AUX, + MIC_IN, + TELEPHONY, + SPDIF_IN, + DIGITAL_OTHER_IN, + DEVICE_OTHER = 0xf, +}; + +enum azalia_pin_location_1 { + NA = 0, + REAR, + FRONT, + LEFT, + RIGHT, + TOP, + BOTTOM, + SPECIAL7, + SPECIAL8, + SPECIAL9, +}; + +enum azalia_pin_location_2 { + EXTERNAL_PRIMARY_CHASSIS = 0, + INTERNAL, + SEPARATE_CHASSIS, + LOCATION_OTHER +}; + +#define AZALIA_PIN_DESC(conn, location2, location1, dev, type, color, no_presence_detect, \ + association, sequence) \ + (((conn) << 30) | \ + ((location2) << 27) | \ + ((location1) << 24) | \ + ((dev) << 20) | \ + ((type) << 16) | \ + ((color) << 12) | \ + ((no_presence_detect) << 8) | \ + ((sequence) << 4) | \ + ((sequence) << 0)) + #define AZALIA_ARRAY_SIZES const u32 pc_beep_verbs_size = \ ARRAY_SIZE(pc_beep_verbs); \ const u32 cim_verb_data_size = sizeof(cim_verb_data)
9elements QA has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39694 )
Change subject: include/device/azalia: Add enums and MACROs ......................................................................
Patch Set 7:
Automatic boot test returned (PASS/FAIL/TOTAL): 4/0/4 Emulation targets: "QEMU x86 q35/ich9" using payload TianoCore : SUCCESS : https://lava.9esec.io/r/2655 "QEMU x86 q35/ich9" using payload SeaBIOS : SUCCESS : https://lava.9esec.io/r/2654 "QEMU x86 i440fx/piix4" using payload SeaBIOS : SUCCESS : https://lava.9esec.io/r/2653 "QEMU AArch64" using payload LinuxBoot_u-root_kexec : SUCCESS : https://lava.9esec.io/r/2652
Please note: This test is under development and might not be accurate at all!