mindboards/ev3dev-kernel — pull request #9 by dlech (2014-01-06 20:26:00+00:00)
Title: Change PCM sample rate

This is based on @fdetro's feedback from #7.

A couple of important things:

1. My duty_ticks calculation was wrong. It was clipping any negative values, so we were only getting 1/2 sine wave. This is fixed as well as the volume control changes I mentioned in #7.
2. ```ehrpwm_et_set_sel_evt(pwm, ET_CTR_PRD, ET_3RD)``` means that that ```snd_legoev3_et_callback``` is called on every 3rd pulse. This lets the PWM be 66150 Hz while our sample rate is 22050 Hz.