Skip to content

Conversation

@mmuman
Copy link
Contributor

@mmuman mmuman commented Feb 15, 2025

Fix 32 bit; add sound & init system.

For historical reasons int32 and int32_t are not compatible types.
@CarterLi
Copy link
Member

init of haiku isn't pid 1?

@CarterLi
Copy link
Member

Does Host module work for you?

@mmuman
Copy link
Contributor Author

mmuman commented Feb 15, 2025

init of haiku isn't pid 1?

No, pid 1 is the kernel actually, and unlike BeOS, Haiku shares the thread and team(process) namespaces, so like now launch_daemon is 57.

Does Host module work for you?

I seem to get some DMI info yes.

@CarterLi
Copy link
Member

No, pid 1 is the kernel actually

In Haiku kernel is a userland process?

I seem to get some DMI info yes.

Does it print SM2 or SM3?

@CarterLi
Copy link
Member

Does Haiku have any API / syscalls to query DMI data?

@mmuman
Copy link
Contributor Author

mmuman commented Feb 15, 2025

In Haiku kernel is a userland process?

No but it is treated as a process regardless.

Does it print SM2 or SM3?

SM2.

@mmuman
Copy link
Contributor Author

mmuman commented Feb 15, 2025

Does Haiku have any API / syscalls to query DMI data?

No, I don't even think we use these in the kernel, unlike ACPI.

@CarterLi
Copy link
Member

Strangely it doesn't work for @Begasus. Maybe there are some bugs in SM3 related code

@mmuman
Copy link
Contributor Author

mmuman commented Feb 15, 2025

Or maybe it only works for 32bit? Could be a 64bit related bug in the mem driver.

@CarterLi
Copy link
Member

Does Haiku have any API / syscalls to query DMI data?

No, I don't even think we use these in the kernel, unlike ACPI.

I do find this one; doesn't seem to be useful though: https://github.com/haiku/haiku/blob/master/headers/private/drivers/smbios.h

@CarterLi
Copy link
Member

Or maybe it only works for 32bit?

It works for me in my VM, 64bit. But it also uses SM2

@CarterLi CarterLi merged commit 1c858ae into fastfetch-cli:dev Feb 15, 2025
19 checks passed
@mmuman mmuman deleted the haiku-fixes branch February 15, 2025 04:12
@CarterLi
Copy link
Member

My compiler complains that variable mute is set but not used

@mmuman
Copy link
Contributor Author

mmuman commented Feb 15, 2025

My compiler complains that variable mute is set but not used

I reused code from setvolume, I wasn't sure on how to report it, either ignore or report 0% as volume?

@Begasus
Copy link

Begasus commented Feb 15, 2025

Probably related output in Terminal?

BParameter::GetValue parameter 'Mute' querying node 2, port 280 failed: General system error

@mmuman
Copy link
Contributor Author

mmuman commented Feb 15, 2025

Hmm it shouldn't print an error…

@Begasus
Copy link

Begasus commented Feb 15, 2025

I get this on both arch's

@mmuman
Copy link
Contributor Author

mmuman commented Feb 15, 2025

It's odd, I wouldn't think the mixer would have different configurations.
Do we want to handle it or just remove that?
Seems other platforms handle mute as 0% volume, I'll fix that.

@Begasus
Copy link

Begasus commented Feb 15, 2025

Best remove or disable it untill it could be figured out

@mmuman
Copy link
Contributor Author

mmuman commented Feb 15, 2025

I don't see why you get an error message, the code only enumerates parameters, and only reads the gain one for now…

@Begasus
Copy link

Begasus commented Feb 15, 2025

Hmm it shouldn't print an error…

Should problably mention it's not a build error, it shows up when running fastfetch in Terminal. :)

@mmuman
Copy link
Contributor Author

mmuman commented Feb 15, 2025

Yes but we don't try to get the value yet… 🤷

@Begasus
Copy link

Begasus commented Feb 15, 2025

Maybe showed up with the debug enabled?

@mmuman
Copy link
Contributor Author

mmuman commented Feb 15, 2025

Oh I didn't know someone else wrote it already… :-D
Technically, the default type for the value is int32, maybe the size of bool on 64bit doesn't match?

@mmuman
Copy link
Contributor Author

mmuman commented Feb 15, 2025

Ah, now after rebasing I get the same error 😅

@mmuman
Copy link
Contributor Author

mmuman commented Feb 15, 2025

Argh, sizeof(bool) is 1, not 4, which is why it complains. change isMute to int32.

@Begasus
Copy link

Begasus commented Feb 15, 2025

That worked, error is gone now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants