diff options
author | Stuart Brady <sdb@parisc-linux.org> | 2005-10-21 22:42:38 -0400 |
---|---|---|
committer | Kyle McMartin <kyle@parisc-linux.org> | 2005-10-21 22:42:38 -0400 |
commit | 3a165680168758733b7a9f7fb835954fbe6b91a8 (patch) | |
tree | 634b8e305fd9de734f77ac224d404abd574b9d0a /sound/parisc/harmony.h | |
parent | 5cd55b0edee7f979530c86b23728d461ddeb9f3f (diff) |
[PARISC] Update harmony from parisc tree
o Added a control for the input source (which can be either
"line" or "mic")
o Mute the speaker/line-out/headphone outputs by default.
o Increased the buffer size from 10 pages to 16.
Signed-off-by: Stuart Brady <sdb@parisc-linux.org>
ALSA Harmony was resetting the capture position when
preparing the capture substream, which it shouldn't do.
This should fix the problem.
Signed-off-by: Stuart Brady <sdb@parisc-linux.org>
ALSA Harmony should no longer play junk (left in the buffers
from a previous stream) at the start of a new stream.
Implement the monitor mixer channel for ALSA Harmony.
Also prevent snd_harmony_volume_get from returning negative values.
Signed-off-by: Stuart Brady <sdb@parisc-linux.org>
Use the graveyard/silence buffers in ALSA Harmony.
Signed-off-by: Stuart Brady <sdb@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Diffstat (limited to 'sound/parisc/harmony.h')
-rw-r--r-- | sound/parisc/harmony.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/sound/parisc/harmony.h b/sound/parisc/harmony.h index ef77f9a577d5..526c52389de2 100644 --- a/sound/parisc/harmony.h +++ b/sound/parisc/harmony.h | |||
@@ -61,7 +61,7 @@ typedef struct snd_card_harmony { | |||
61 | #define HARMONY_SIZE 64 | 61 | #define HARMONY_SIZE 64 |
62 | 62 | ||
63 | #define BUF_SIZE PAGE_SIZE | 63 | #define BUF_SIZE PAGE_SIZE |
64 | #define MAX_BUFS 10 | 64 | #define MAX_BUFS 16 |
65 | #define MAX_BUF_SIZE (MAX_BUFS * BUF_SIZE) | 65 | #define MAX_BUF_SIZE (MAX_BUFS * BUF_SIZE) |
66 | 66 | ||
67 | #define PLAYBACK_BUFS MAX_BUFS | 67 | #define PLAYBACK_BUFS MAX_BUFS |
@@ -101,28 +101,31 @@ typedef struct snd_card_harmony { | |||
101 | #define HARMONY_SS_MONO 0x00000000 | 101 | #define HARMONY_SS_MONO 0x00000000 |
102 | #define HARMONY_SS_STEREO 0x00000001 | 102 | #define HARMONY_SS_STEREO 0x00000001 |
103 | 103 | ||
104 | #define HARMONY_GAIN_SILENCE 0x00F00FFF | 104 | #define HARMONY_GAIN_SILENCE 0x01F00FFF |
105 | #define HARMONY_GAIN_DEFAULT 0x0FF00000 | 105 | #define HARMONY_GAIN_DEFAULT 0x01F00FFF |
106 | 106 | ||
107 | #define HARMONY_GAIN_HE_SHIFT 27 | 107 | #define HARMONY_GAIN_HE_SHIFT 27 /* headphones enabled */ |
108 | #define HARMONY_GAIN_HE_MASK (1 << HARMONY_GAIN_HE_SHIFT) | 108 | #define HARMONY_GAIN_HE_MASK (1 << HARMONY_GAIN_HE_SHIFT) |
109 | #define HARMONY_GAIN_LE_SHIFT 26 | 109 | #define HARMONY_GAIN_LE_SHIFT 26 /* line-out enabled */ |
110 | #define HARMONY_GAIN_LE_MASK (1 << HARMONY_GAIN_LE_SHIFT) | 110 | #define HARMONY_GAIN_LE_MASK (1 << HARMONY_GAIN_LE_SHIFT) |
111 | #define HARMONY_GAIN_SE_SHIFT 25 | 111 | #define HARMONY_GAIN_SE_SHIFT 25 /* internal-speaker enabled */ |
112 | #define HARMONY_GAIN_SE_MASK (1 << HARMONY_GAIN_SE_SHIFT) | 112 | #define HARMONY_GAIN_SE_MASK (1 << HARMONY_GAIN_SE_SHIFT) |
113 | #define HARMONY_GAIN_IS_SHIFT 24 | 113 | #define HARMONY_GAIN_IS_SHIFT 24 /* input select - 0 for line, 1 for mic */ |
114 | #define HARMONY_GAIN_IS_MASK (1 << HARMONY_GAIN_IS_SHIFT) | 114 | #define HARMONY_GAIN_IS_MASK (1 << HARMONY_GAIN_IS_SHIFT) |
115 | 115 | ||
116 | /* monitor attenuation */ | ||
116 | #define HARMONY_GAIN_MA 0x0f | 117 | #define HARMONY_GAIN_MA 0x0f |
117 | #define HARMONY_GAIN_MA_SHIFT 20 | 118 | #define HARMONY_GAIN_MA_SHIFT 20 |
118 | #define HARMONY_GAIN_MA_MASK (HARMONY_GAIN_MA << HARMONY_GAIN_MA_SHIFT) | 119 | #define HARMONY_GAIN_MA_MASK (HARMONY_GAIN_MA << HARMONY_GAIN_MA_SHIFT) |
119 | 120 | ||
121 | /* input gain */ | ||
120 | #define HARMONY_GAIN_IN 0x0f | 122 | #define HARMONY_GAIN_IN 0x0f |
121 | #define HARMONY_GAIN_LI_SHIFT 16 | 123 | #define HARMONY_GAIN_LI_SHIFT 16 |
122 | #define HARMONY_GAIN_LI_MASK (HARMONY_GAIN_IN << HARMONY_GAIN_LI_SHIFT) | 124 | #define HARMONY_GAIN_LI_MASK (HARMONY_GAIN_IN << HARMONY_GAIN_LI_SHIFT) |
123 | #define HARMONY_GAIN_RI_SHIFT 12 | 125 | #define HARMONY_GAIN_RI_SHIFT 12 |
124 | #define HARMONY_GAIN_RI_MASK (HARMONY_GAIN_IN << HARMONY_GAIN_RI_SHIFT) | 126 | #define HARMONY_GAIN_RI_MASK (HARMONY_GAIN_IN << HARMONY_GAIN_RI_SHIFT) |
125 | 127 | ||
128 | /* output gain (master volume) */ | ||
126 | #define HARMONY_GAIN_OUT 0x3f | 129 | #define HARMONY_GAIN_OUT 0x3f |
127 | #define HARMONY_GAIN_LO_SHIFT 6 | 130 | #define HARMONY_GAIN_LO_SHIFT 6 |
128 | #define HARMONY_GAIN_LO_MASK (HARMONY_GAIN_OUT << HARMONY_GAIN_LO_SHIFT) | 131 | #define HARMONY_GAIN_LO_MASK (HARMONY_GAIN_OUT << HARMONY_GAIN_LO_SHIFT) |