Giter Site home page Giter Site logo

something wrong in audio about hdmi HOT 6 CLOSED

LMN128 avatar LMN128 commented on August 15, 2024 1
something wrong in audio

from hdmi.

Comments (6)

mopplayer avatar mopplayer commented on August 15, 2024 1

Hi @sameer,

I have created another issue.

Thank you very much.

from hdmi.

sameer avatar sameer commented on August 15, 2024

Hi Jan,

I'm not aware of any particular logic that would cause that. Could you share the changes you made to that code to use 24 bit audio? That way I can look into this issue with the top testbench. Also, did you already try using a non-signed representation?

from hdmi.

LMN128 avatar LMN128 commented on August 15, 2024

Hi Sameer,
sorry for confusion second problem is not related to 24bits audio, but with 44100Hz sample rate. I use this code:

logic clk_audio;
logic [8:0] audio_divider;

always_ff@(posedge clk_pixel) 
begin
if (audio_divider<9'd306-1) audio_divider++; //generated from clk_pixel 27.0000MHz/281=48042,70Hz ; 27.0000MHz/306=44117,64Hz
else  begin clk_audio<=~clk_audio; audio_divider<=0; end
end

logic [23:0] audio_sample_word [1:0] = '{24'sd0, 24'sd0};
always_ff@(posedge clk_audio)
begin
audio_sample_word[0] <= audio_sample_word[0] + 128;  //sawtooth generator
audio_sample_word[1] <= audio_sample_word[1] - 256;  
end 

logic [23:0] rgb = 24'd0;
logic [9:0] cx, cy, screen_start_x, screen_start_y, frame_width, frame_height, screen_width, screen_height;
// Border test (left = red, top = green, right = blue, bottom = blue, fill = black)
always_ff@(posedge clk_pixel)
  rgb <= {cx == screen_start_x ? ~8'd0 : 8'd0, cy == screen_start_y ? ~8'd0 : 8'd0, cx == frame_width - 1'd1 || cy == frame_height - 1'd1 ? ~8'd0 : 8'd0};

hdmi #(.VIDEO_ID_CODE(17), .VIDEO_REFRESH_RATE(50), .AUDIO_RATE(44100), .AUDIO_BIT_WIDTH(24)) hdmi(
  .clk_pixel_x10(clk_pixel_x10),
  .clk_pixel(clk_pixel),
  .clk_audio(clk_audio),
  .rgb(rgb),
  .audio_sample_word(audio_sample_word),
  .tmds_p(dvdata_p),
  .tmds_clock_p(dvclk_p),
  .tmds_n(dvdata_n),
  .tmds_clock_n(dvclk_n),
  .cx(cx),
  .cy(cy),
  .screen_start_x(screen_start_x),
  .screen_start_y(screen_start_y),
  .frame_width(frame_width),
  .frame_height(frame_height),
  .screen_width(screen_width),
  .screen_height(screen_height)
);

and look at how is signal produced.
image
When I change sample rate to 48000Hz the signal has nice sawtooth shape.

from hdmi.

mopplayer avatar mopplayer commented on August 15, 2024

Hi,

l think you are successful to set up and show.

I use the test pattern to test, there are always two block shown.

Is my screen not supported? or something wrong?

Did you have some ideas?

https://imgur.com/ArIkfPk

from hdmi.

sameer avatar sameer commented on August 15, 2024

from hdmi.

sameer avatar sameer commented on August 15, 2024

Should be resolved by 08936f6

from hdmi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.