Code Monkey home page Code Monkey logo

Comments (22)

karawin avatar karawin commented on June 10, 2024

Yes found it. A problem with spi when the output is i2s.
Corrected now in revision 2 available.

from ka-radio32.

pilnikov avatar pilnikov commented on June 10, 2024

Tnx. I check it ASAP

from ka-radio32.

pilnikov avatar pilnikov commented on June 10, 2024

I do not use the rotary encoder. In "stock" config sound is good, but system send warning about button3 (no encoder button)
com_good
p_20180913_145739

if i comment encoder handler - the warning goes away, the picture on the screen changes, and I get a problem with the sound
com_poor
prog_poor
p_20180913_150305

from ka-radio32.

karawin avatar karawin commented on June 10, 2024

It is not a warning, it is a debug message.
Send
sys.logw
To the interface to change the log level to warning.

from ka-radio32.

pilnikov avatar pilnikov commented on June 10, 2024

com_poor

no warning - sound bad - ~ once time per second "TRR"

from ka-radio32.

pilnikov avatar pilnikov commented on June 10, 2024

I found the source of the problem - addonucg.c, function drawFrameUcg
addonucg
If comment lines as in the screenshot - with the sound all ok! only time does not draw

P.S. also helps commenting the line markDrawUcg(TIME);
time is drawing, but freeze

from ka-radio32.

karawin avatar karawin commented on June 10, 2024

Try
void drawLinesUcg()
{
setfont(text);
for (int i=0;i<LINES;i++)
{
taskYIELD();
if (mline[i]) draw(i);
}
}

from ka-radio32.

pilnikov avatar pilnikov commented on June 10, 2024

Also uncorrect drawing (on screen) symbols russian "ё" & "Ё" (code 1105 & 1025) - incomplete font conversion

from ka-radio32.

pilnikov avatar pilnikov commented on June 10, 2024

taskYIELD();

no effect

from ka-radio32.

karawin avatar karawin commented on June 10, 2024

And a lot of other char. The used font is not complete
utf8To1251_t utf8To1251[UTF8TO1251] = {{0x401,0x45/0xa8/},{0x402,0x80},{0x403,0x81},{0x404,0xaa},{0x405,0xbd},{0x406,0x49/0xb2/},{0x407,0xaf},{0x408,0xa3},
{0x409,0x8a},{0x40a,0x8c},{0x40b,0x8e},{0x40c,0x8d},{0x40e,0xa1},{0x40f,0x8f},{0x452,0x90},{0x451,0x65/0xb8/},
{0x453,0x83},{0x454,0xba},{0x455,0xbe},{0x456,0x69/0xb3/},{0x457,0xbf},{0x458,0x6a/0xbc/},{0x459,0x9a},{0x45a,0x9c},
{0x45b,0x9e},{0x45c,0x9d},{0x45f,0x9f},{0x490,0xa5},{0x491,0xb4},
{0,0}};
uint8_t to1251(uint16_t utf8)
{
int i;
if (utf8 > 0x491) return 0x1f;
for (i = 0; i<UTF8TO1251;i++)
{
if (utf8 == utf8To1251[i].utf8)
{
// printf("to1251: utf8: %x, ret: %x\n",utf8,utf8To1251[i].c1251);
return utf8To1251[i].c1251;
}
}

// printf("to1251: utf8: %x, ret: %x\n",utf8,(utf8 - 0x350)& 0xff);
return ((utf8 - 0x350)& 0xff );
}

from ka-radio32.

pilnikov avatar pilnikov commented on June 10, 2024

i comment ucg_DrawString(&ucg,0,yy - 30,0,strtime);
in void draw(int i)
time not drawing - sound ok, but ...
any dynamics on the screen (long titles - they need scrolling) - everything! the sound broke.

from ka-radio32.

karawin avatar karawin commented on June 10, 2024

Ok,
So in app_main.c line 981
replace
xTaskCreatePinnedToCore (task_addon, "task_addon", 2600, NULL, 10, &pxCreatedTask,1); //high priority for the spi else too slow due to ucglib
by
xTaskCreatePinnedToCore (task_addon, "task_addon", 2600, NULL, 2, &pxCreatedTask,1);

A test i forgot to remove....

from ka-radio32.

pilnikov avatar pilnikov commented on June 10, 2024

main
The sound is excellent only if the priority of the task "addons" is the lowest. The screen is very slow, updating approximately once time every 4 seconds

from ka-radio32.

karawin avatar karawin commented on June 10, 2024

I don't understand why your config is so slow.
I tested a lcd 194 ili9341 with a dac output with and without a rotary, without problem with the last modification.
I cannot test with a PCM5102. I will order one to test it.

from ka-radio32.

karawin avatar karawin commented on June 10, 2024

Try level 4 please

from ka-radio32.

pilnikov avatar pilnikov commented on June 10, 2024

Bad idea
Good, only if level is 1 (but slooooowly)

from ka-radio32.

karawin avatar karawin commented on June 10, 2024

I have modified audio_renderer.c in order to improve the dma transfert.
Please take it (not yet finished but work well) at http://karadio.karawin.fr/test/audio_renderer.c
and put it in \esp\Ka-Radio32\components\audio_renderer
It may improve a lot the problem.

from ka-radio32.

pilnikov avatar pilnikov commented on June 10, 2024

The sound quality became much better (priority 4). Artifacts appear once every few(15-20) seconds. Sometimes floats the playback speed (not much) both in + and -.
P.S. Artifacts remained with "long titles" (scrolling)

from ka-radio32.

karawin avatar karawin commented on June 10, 2024

Take the new 1.3R3 release.

from ka-radio32.

pilnikov avatar pilnikov commented on June 10, 2024

close?

from ka-radio32.

pilnikov avatar pilnikov commented on June 10, 2024

upgrade to 1.3r3 - sound is agreeable

from ka-radio32.

karawin avatar karawin commented on June 10, 2024

ok, Good, i close it
Thanks.

from ka-radio32.

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.