diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2020-07-17 00:01:32 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2020-07-24 21:20:13 +0000 |
commit | 8cb555460ff79e636a7907fb2589e16db98c8600 (patch) | |
tree | 930a3878c7641c9ce045b24f0ade1309e36d5806 /apps/gui/skin_engine | |
parent | 0c4f89370d05056faa789aa9cabcccc4e509fb9f (diff) | |
download | rockbox-8cb555460ff79e636a7907fb2589e16db98c8600.tar.gz rockbox-8cb555460ff79e636a7907fb2589e16db98c8600.zip |
[3/4] Completely remove HWCODEC support
'swcodec' is now always set (and recording_swcodec for recording-capable
units) in feature.txt so the manual and language strings don't need to
all be fixed up.
Change-Id: Ib2c9d5d157af8d33653e2d4b4a12881b9aa6ddb0
Diffstat (limited to 'apps/gui/skin_engine')
-rw-r--r-- | apps/gui/skin_engine/skin_display.c | 2 | ||||
-rw-r--r-- | apps/gui/skin_engine/skin_tokens.c | 39 |
2 files changed, 3 insertions, 38 deletions
diff --git a/apps/gui/skin_engine/skin_display.c b/apps/gui/skin_engine/skin_display.c index 7ee349b346..345d74b65c 100644 --- a/apps/gui/skin_engine/skin_display.c +++ b/apps/gui/skin_engine/skin_display.c | |||
@@ -57,9 +57,7 @@ | |||
57 | #endif | 57 | #endif |
58 | 58 | ||
59 | #include "cuesheet.h" | 59 | #include "cuesheet.h" |
60 | #if CONFIG_CODEC == SWCODEC | ||
61 | #include "playback.h" | 60 | #include "playback.h" |
62 | #endif | ||
63 | #include "backdrop.h" | 61 | #include "backdrop.h" |
64 | #include "viewport.h" | 62 | #include "viewport.h" |
65 | #if CONFIG_TUNER | 63 | #if CONFIG_TUNER |
diff --git a/apps/gui/skin_engine/skin_tokens.c b/apps/gui/skin_engine/skin_tokens.c index 50704fd66e..2528a0af55 100644 --- a/apps/gui/skin_engine/skin_tokens.c +++ b/apps/gui/skin_engine/skin_tokens.c | |||
@@ -47,10 +47,8 @@ | |||
47 | #include "albumart.h" | 47 | #include "albumart.h" |
48 | #endif | 48 | #endif |
49 | #include "playlist.h" | 49 | #include "playlist.h" |
50 | #if CONFIG_CODEC == SWCODEC | ||
51 | #include "playback.h" | 50 | #include "playback.h" |
52 | #include "tdspeed.h" | 51 | #include "tdspeed.h" |
53 | #endif | ||
54 | #include "viewport.h" | 52 | #include "viewport.h" |
55 | #include "tagcache.h" | 53 | #include "tagcache.h" |
56 | 54 | ||
@@ -558,18 +556,16 @@ static struct mp3entry* get_mp3entry_from_offset(int offset, char **filename) | |||
558 | static char filename_buf[MAX_PATH + 1]; | 556 | static char filename_buf[MAX_PATH + 1]; |
559 | fname = playlist_peek(offset, filename_buf, sizeof(filename_buf)); | 557 | fname = playlist_peek(offset, filename_buf, sizeof(filename_buf)); |
560 | *filename = (char*)fname; | 558 | *filename = (char*)fname; |
561 | #if CONFIG_CODEC == SWCODEC | ||
562 | static struct mp3entry tempid3; | 559 | static struct mp3entry tempid3; |
563 | if ( | 560 | if ( |
564 | #if defined(HAVE_TC_RAMCACHE) && defined(HAVE_DIRCACHE) | 561 | #if defined(HAVE_TC_RAMCACHE) && defined(HAVE_DIRCACHE) |
565 | tagcache_fill_tags(&tempid3, fname) || | 562 | tagcache_fill_tags(&tempid3, fname) || |
566 | #endif | 563 | #endif |
567 | audio_peek_track(&tempid3, offset) | 564 | audio_peek_track(&tempid3, offset) |
568 | ) | 565 | ) |
569 | { | 566 | { |
570 | pid3 = &tempid3; | 567 | pid3 = &tempid3; |
571 | } | 568 | } |
572 | #endif | ||
573 | } | 569 | } |
574 | return pid3; | 570 | return pid3; |
575 | } | 571 | } |
@@ -1224,7 +1220,6 @@ const char *get_token_value(struct gui_wps *gwps, | |||
1224 | } | 1220 | } |
1225 | #endif | 1221 | #endif |
1226 | 1222 | ||
1227 | #if (CONFIG_CODEC == SWCODEC) | ||
1228 | case SKIN_TOKEN_CROSSFADE: | 1223 | case SKIN_TOKEN_CROSSFADE: |
1229 | #ifdef HAVE_CROSSFADE | 1224 | #ifdef HAVE_CROSSFADE |
1230 | if (intval) | 1225 | if (intval) |
@@ -1277,7 +1272,6 @@ const char *get_token_value(struct gui_wps *gwps, | |||
1277 | } | 1272 | } |
1278 | return buf; | 1273 | return buf; |
1279 | } | 1274 | } |
1280 | #endif /* (CONFIG_CODEC == SWCODEC) */ | ||
1281 | 1275 | ||
1282 | #if defined (HAVE_PITCHCONTROL) | 1276 | #if defined (HAVE_PITCHCONTROL) |
1283 | case SKIN_TOKEN_SOUND_PITCH: | 1277 | case SKIN_TOKEN_SOUND_PITCH: |
@@ -1294,7 +1288,7 @@ const char *get_token_value(struct gui_wps *gwps, | |||
1294 | } | 1288 | } |
1295 | #endif | 1289 | #endif |
1296 | 1290 | ||
1297 | #if (CONFIG_CODEC == SWCODEC) && defined (HAVE_PITCHCONTROL) | 1291 | #if defined (HAVE_PITCHCONTROL) |
1298 | case SKIN_TOKEN_SOUND_SPEED: | 1292 | case SKIN_TOKEN_SOUND_SPEED: |
1299 | { | 1293 | { |
1300 | int32_t pitch = sound_get_pitch(); | 1294 | int32_t pitch = sound_get_pitch(); |
@@ -1462,7 +1456,6 @@ const char *get_token_value(struct gui_wps *gwps, | |||
1462 | return NULL; | 1456 | return NULL; |
1463 | case SKIN_TOKEN_REC_FREQ: /* order from REC_FREQ_CFG_VAL_LIST */ | 1457 | case SKIN_TOKEN_REC_FREQ: /* order from REC_FREQ_CFG_VAL_LIST */ |
1464 | { | 1458 | { |
1465 | #if CONFIG_CODEC == SWCODEC | ||
1466 | unsigned long samprk; | 1459 | unsigned long samprk; |
1467 | int rec_freq = global_settings.rec_frequency; | 1460 | int rec_freq = global_settings.rec_frequency; |
1468 | 1461 | ||
@@ -1528,26 +1521,8 @@ const char *get_token_value(struct gui_wps *gwps, | |||
1528 | } | 1521 | } |
1529 | } | 1522 | } |
1530 | snprintf(buf, buf_size, "%lu.%1lu", samprk/1000,samprk%1000); | 1523 | snprintf(buf, buf_size, "%lu.%1lu", samprk/1000,samprk%1000); |
1531 | #else /* HWCODEC */ | ||
1532 | |||
1533 | static const char * const freq_strings[] = | ||
1534 | {"--", "44", "48", "32", "22", "24", "16"}; | ||
1535 | int freq = 1 + global_settings.rec_frequency; | ||
1536 | #ifdef HAVE_SPDIF_REC | ||
1537 | if (global_settings.rec_source == AUDIO_SRC_SPDIF) | ||
1538 | { | ||
1539 | /* Can't measure S/PDIF sample rate on Archos/Sim yet */ | ||
1540 | freq = 0; | ||
1541 | } | ||
1542 | #endif /* HAVE_SPDIF_IN */ | ||
1543 | if (intval) | ||
1544 | *intval = freq+1; /* so the token gets a value 1<=x<=7 */ | ||
1545 | snprintf(buf, buf_size, "%s\n", | ||
1546 | freq_strings[global_settings.rec_frequency]); | ||
1547 | #endif | ||
1548 | return buf; | 1524 | return buf; |
1549 | } | 1525 | } |
1550 | #if CONFIG_CODEC == SWCODEC | ||
1551 | case SKIN_TOKEN_REC_ENCODER: | 1526 | case SKIN_TOKEN_REC_ENCODER: |
1552 | { | 1527 | { |
1553 | int rec_format = global_settings.rec_format+1; /* WAV, AIFF, WV, MPEG */ | 1528 | int rec_format = global_settings.rec_format+1; /* WAV, AIFF, WV, MPEG */ |
@@ -1568,9 +1543,7 @@ const char *get_token_value(struct gui_wps *gwps, | |||
1568 | } | 1543 | } |
1569 | break; | 1544 | break; |
1570 | } | 1545 | } |
1571 | #endif | ||
1572 | case SKIN_TOKEN_REC_BITRATE: | 1546 | case SKIN_TOKEN_REC_BITRATE: |
1573 | #if CONFIG_CODEC == SWCODEC | ||
1574 | if (global_settings.rec_format == REC_FORMAT_MPA_L3) | 1547 | if (global_settings.rec_format == REC_FORMAT_MPA_L3) |
1575 | { | 1548 | { |
1576 | if (intval) | 1549 | if (intval) |
@@ -1632,17 +1605,11 @@ const char *get_token_value(struct gui_wps *gwps, | |||
1632 | } | 1605 | } |
1633 | else | 1606 | else |
1634 | return NULL; /* Fixme later */ | 1607 | return NULL; /* Fixme later */ |
1635 | #else /* CONFIG_CODEC == HWCODEC */ | ||
1636 | if (intval) | ||
1637 | *intval = global_settings.rec_quality+1; | ||
1638 | snprintf(buf, buf_size, "%d", global_settings.rec_quality); | ||
1639 | return buf; | ||
1640 | #endif | ||
1641 | case SKIN_TOKEN_REC_MONO: | 1608 | case SKIN_TOKEN_REC_MONO: |
1642 | if (!global_settings.rec_channels) | 1609 | if (!global_settings.rec_channels) |
1643 | return "m"; | 1610 | return "m"; |
1644 | return NULL; | 1611 | return NULL; |
1645 | 1612 | ||
1646 | case SKIN_TOKEN_REC_SECONDS: | 1613 | case SKIN_TOKEN_REC_SECONDS: |
1647 | { | 1614 | { |
1648 | int time = (audio_recorded_time() / HZ) % 60; | 1615 | int time = (audio_recorded_time() / HZ) % 60; |