[Patch] Kmix alsa addtions
Walt H
walt_h at lorettotel.net
Thu Dec 23 16:28:23 GMT 2004
Christian Esken wrote:
>Am Freitag 17 Dezember 2004 18:53 schrieb Walt H:
>
>
>>Hello,
>>
>>I've put together some (rough) patches to handle a situation that arises
>>in kmix when using the Alsa drivers for an emu10k1 based soundcard
>>
>>
>
>Hi Walt,
>
>this is great. There are so many KMIx bugreports with emu based soundcards.
>So I am very glad about your patches.
>
>
Good to hear :)
>
>
>>(audigy for me). What these patches do:
>>
>>Allow both output / input for a specific channel and separate the two.
>>This allows you to, for example, have separate volume controls for both
>>playback and capture for the Microphone, CD etc...
>>
>>
>
>I have to discuss this with Helio.
>
>
>
>>I'm not a very experienced C/C++ coder, so these patches may be a bit
>>rough. I've tested the resulting app on my audigy based system as well
>>as my other non-audigy based systems with good results. I checked out
>>the kmix source via CVS to see if this issue was corrected yet, and
>>didn't see that it was. So, I hacked this up. Hope it's useful.
>>
>>
>
>The patch is quite big and I am currently trying to understand it.
>
>As far as I see you made an own method createVolumeObject(), which
>might be a good idea (lets see).
>
>The thing I haven't understood yet: What getRecordStatus() is good for?
>
>
Sorry about that. I should've explained what I was doing better.
Basically, much of the large size of the patch comes from copy/paste of
the code that was located under openMixer(). I relocated the volume
object creation to createVolumeObject(), which now gets called at least
once within the 'for each elem' loop. In the case where an element can
be both play and record, the createVolume... code gets called twice with
the masterIdx incremented appropriately. Once as a playback object, and
once as a record object with canRecord set to true.
The getRecordStatus method checks to if an element is a recordable
element and is mostly called from the get and set volume methods. This
is done so that each independent volume level for both playback and
record level can be retrieved on an element which is capable of both
playback and record. In this way, I can separate the two so that I can
show the element in both the output and input sections of the mixer ui
with their respective volumes.
Does this help?
>
>
>
>>My code only handles Alsa based soundcards. I haven't even looked /
>>
>>
>
>This is fine.
>
>Chris
>
>
>
>
Good. I've been running kmix with the patch applied on 3 separate
computers in my house (1 audigy based sound) with no obvious ill effects
for the past week. I have not, however, tested this patch on any other
emu based sound card systems. I would think that if they're similar to
how my Audigy works (element is both playback / record), that it should
operate fine. Be nice to get some additional feedback from users :)
Thanks,
-Walt
More information about the kde-multimedia
mailing list