Changeset b1926d0a in mainline
- Timestamp:
- 2011-09-26T08:50:38Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b3f36d2
- Parents:
- a4a4e47
- Location:
- uspace/drv/audio/sb16
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/audio/sb16/mixer.c
ra4a4e47 rb1926d0a 40 40 uint8_t channels; 41 41 const char *description; 42 unsigned min_value; 43 unsigned max_value; 42 unsigned volume_levels; 44 43 unsigned shift; 45 44 bool same_reg; … … 47 46 48 47 static const volume_item_t volume_ct1335[] = { 49 { 0x02, 1, "Master", 0, 7, 1, true },50 { 0x06, 1, "MIDI", 0, 7, 1, true },51 { 0x08, 1, "CD", 0, 7, 1, true },52 { 0x0a, 1, "Voice", 0, 3, 1, true },48 { 0x02, 1, "Master", 8, 1, true }, 49 { 0x06, 1, "MIDI", 8, 1, true }, 50 { 0x08, 1, "CD", 8, 1, true }, 51 { 0x0a, 1, "Voice", 4, 1, true }, 53 52 }; 54 53 55 54 static const volume_item_t volume_ct1345[] = { 56 { 0x04, 2, "Voice", 0, 7, 1, true },57 { 0x0a, 1, "Mic", 0, 3, 1, true },58 { 0x22, 2, "Master", 0, 7, 1, true },59 { 0x26, 2, "MIDI", 0, 7, 1, true },60 { 0x28, 2, "CD", 0, 7, 1, true },61 { 0x2e, 2, "Line", 0, 7, 1, true },55 { 0x04, 2, "Voice", 8, 1, true }, 56 { 0x0a, 1, "Mic", 4, 1, true }, 57 { 0x22, 2, "Master", 8, 1, true }, 58 { 0x26, 2, "MIDI", 8, 1, true }, 59 { 0x28, 2, "CD", 8, 1, true }, 60 { 0x2e, 2, "Line", 8, 1, true }, 62 61 }; 63 62 64 63 static const volume_item_t volume_ct1745[] = { 65 { 0x30, 2, "Master", 0, 31, 3, false },66 { 0x32, 2, "Voice", 0, 31, 3, false },67 { 0x34, 2, "MIDI", 0, 31, 3, false },68 { 0x36, 2, "CD", 0, 31, 3, false },69 { 0x38, 2, "Line", 0, 31, 3, false },70 { 0x3a, 1, "Mic", 0, 31, 3, false },71 { 0x3b, 1, "PC Speaker", 0, 3, 6, false },72 { 0x3f, 2, "Input Gain", 0, 3, 6, false },73 { 0x41, 2, "Output Gain", 0, 3, 6, false },74 { 0x44, 2, "Treble", 0, 15, 4, false },75 { 0x46, 2, "Bass", 0, 15, 4, false },64 { 0x30, 2, "Master", 32, 3, false }, 65 { 0x32, 2, "Voice", 32, 3, false }, 66 { 0x34, 2, "MIDI", 32, 3, false }, 67 { 0x36, 2, "CD", 32, 3, false }, 68 { 0x38, 2, "Line", 32, 3, false }, 69 { 0x3a, 1, "Mic", 32, 3, false }, 70 { 0x3b, 1, "PC Speaker", 4, 6, false }, 71 { 0x3f, 2, "Input Gain", 4, 6, false }, 72 { 0x41, 2, "Output Gain", 4, 6, false }, 73 { 0x44, 2, "Treble", 16, 4, false }, 74 { 0x46, 2, "Bass", 16, 4, false }, 76 75 }; 77 76 … … 129 128 /*----------------------------------------------------------------------------*/ 130 129 int mixer_get_control_item_info(mixer_type_t type, unsigned index, 131 const char** name, unsigned *channels )130 const char** name, unsigned *channels, unsigned *levels) 132 131 { 133 132 if (index > volume_table[type].count) … … 135 134 136 135 if (name) 137 136 *name = volume_table[type].table[index].description; 138 137 if (channels) 139 *channels = volume_table[type].table[index].channels; 138 *channels = volume_table[type].table[index].channels; 139 if (levels) 140 *levels = volume_table[type].table[index].volume_levels; 140 141 return EOK; 141 142 } -
uspace/drv/audio/sb16/mixer.h
ra4a4e47 rb1926d0a 51 51 int mixer_get_control_item_count(mixer_type_t type); 52 52 int mixer_get_control_item_info(mixer_type_t type, unsigned index, 53 const char** name, unsigned *channels );53 const char** name, unsigned *channels, unsigned *levels); 54 54 int mixer_set_volume_level(sb16_regs_t *regs, mixer_type_t type, 55 55 unsigned item, unsigned channel, unsigned level);
Note:
See TracChangeset
for help on using the changeset viewer.