summaryrefslogtreecommitdiff
path: root/drivers/sound/sound-uclass.c
Commit message (Collapse)AuthorAgeFilesLines
* sound: Add uclass operations for beepingSimon Glass2019-02-201-1/+33
| | | | | | | | | | Some audio codecs such as Intel HDA do not need to use digital data to play sounds, but instead have a way to emit beeps. Add this interface as an option. If the beep interface is not supported, then the sound uclass falls back to the I2S interface. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* sound: Mark sound_setup() as optionalSimon Glass2019-02-201-1/+1
| | | | | | | | This method in the sound API is optional since some drivers can do this when probing or as part of SoC init. Mark it as such. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* dm: sound: Use the correct number of channels for soundSimon Glass2018-12-131-1/+1
| | | | | | | | | | | | At present the 'beep' sound generates a waveform for only one channel even if two are being used. This means that the beep is twice the frequency it should be. Correct this by making it a parameter. The fix in a previous commit was correct for sandbox but not for other boards. Fixes: 03f11e87a8 ("sound: Correct data output in sound_create_square_wave()") Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: sound: Create a uclass for soundSimon Glass2018-12-131-0/+127
The sound driver pulls together the audio codec and i2s drivers in order to actually make sounds. It supports setup() and play() methods. The sound_find_codec_i2s() function allows locating the linked codec and i2s devices. They can be referred to from uclass-private data. Add a uclass and a test for sound. Signed-off-by: Simon Glass <sjg@chromium.org>