Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken audio output #18

Closed
prcoder-1 opened this issue Dec 27, 2023 · 5 comments · Fixed by #20
Closed

Broken audio output #18

prcoder-1 opened this issue Dec 27, 2023 · 5 comments · Fixed by #20
Assignees
Labels
bug Something isn't working

Comments

@prcoder-1
Copy link

Commit 63c4e59 (audio volume fix) breaks sound output.
Hissing over-amplified sound. And the output is only the left channel for some reason.

@vossstef vossstef self-assigned this Dec 27, 2023
@vossstef vossstef added the bug Something isn't working label Dec 27, 2023
@vossstef
Copy link
Owner

@prcoder-1 would you pls. try this correction and let me know ?
Control Audio Volume via OSD (F12 Key) Thx !

@prcoder-1
Copy link
Author

prcoder-1 commented Dec 28, 2023

@prcoder-1 would you pls. try this correction and let me know ? Control Audio Volume via OSD (F12 Key) Thx !

I tried adjusting the volume through the OSD menu (F12). Only the "Off" option works. The rest (33%,66%,100%) work exactly the same and output over-amplified, distorted sound.

@vossstef
Copy link
Owner

strange... Added even rather new HMDI core enhancements and Audio processing identical to Mister main branch. In my opinion there should be a difference. There was a clearly noticeable difference on my Monitor.
I added for your convenience the .fs file too.

https://github.com/vossstef/tang_nano_20k_c64/blob/dev_audiofix/impl/pnr/tang_nano_20k_c64.fs

May you try this ready made synthesized .fs file and let me know ? Sorry for inconvenience. Thx

@prcoder-1
Copy link
Author

prcoder-1 commented Dec 28, 2023

Your .fs file work fine. Sounds right. But volume control doesn't work. Only 'Off' for no sound and other value for sound on.

After these changes, the sound worked fine for me in the version I synthesized:

index edacadd..57bcdae 100644
--- a/src/tang_nano_20k_c64_top.vhd
+++ b/src/tang_nano_20k_c64_top.vhd
@@ -397,8 +397,8 @@ port map(
       g_in      => std_logic_vector(g(7 downto 4)),
       b_in      => std_logic_vector(b(7 downto 4)),
 
-      audio_l => '0' & audio_data_l(17 downto 11) & audio_data_l(17 downto 10),
-      audio_r => '0' & audio_data_l(17 downto 11) & audio_data_l(17 downto 10),
+      audio_l => audio_data_l(17 downto 2),
+      audio_r => audio_data_r(17 downto 2),
       enabled => osd_status,
 
       mcu_start => mcu_start,

I don't understand how this logic works and why only the left channel (audio_data_l() is used in both cases (audio_l and audio_r ):
'0' & audio_data_l(17 downto 11) & audio_data_l(17 downto 10),

Now I want to try to synthesize dev_audiofix branch.

@prcoder-1
Copy link
Author

Branch dev_audiofix synthesized and works well. But the sound volume is not adjustable, it can only be turned off.

@vossstef vossstef linked a pull request Dec 29, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants