Digital selection for gain control not working instead showing 0
pinMode( K1, INPUT );


with

    if(K1 == LOW &amp;&amp; K2 == LOW)


makes no sense. K1 is a pin number. LOW is a macro for 0 (HIGH for 1). You are comparing a static pin number against a static number. 

If K1 is not equal to 0, the inner part of that if statement can never be reached.

What you meant to do was "if the voltage at the pin K1 is low". For that you need to read out the current value of the pin and check it.

For that you must replace your if(K1 == LOW) type statements to if( digitalRead(K1) == LOW). 

I'd also like to mention that you must have a pull-up on your buttons for this "LOW"/"HIGH" logic to work. Either externally, or use INPUT_PULLUP instead of INPUT in pinMode.