diff options
Diffstat (limited to 'sys/dev/sound/fdt/audio_soc.c')
-rw-r--r-- | sys/dev/sound/fdt/audio_soc.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/sound/fdt/audio_soc.c b/sys/dev/sound/fdt/audio_soc.c index 3e937720bb5b..c2bdea399364 100644 --- a/sys/dev/sound/fdt/audio_soc.c +++ b/sys/dev/sound/fdt/audio_soc.c @@ -367,7 +367,7 @@ audio_soc_init(void *arg) auxdev = OF_device_from_xref(aux_devs[i]); if (auxdev == NULL) device_printf(sc->dev, "warning: no driver attached to aux node\n"); - aux_node = (struct audio_soc_aux_node *)malloc(sizeof(*aux_node), M_DEVBUF, M_NOWAIT); + aux_node = malloc(sizeof(*aux_node), M_DEVBUF, M_NOWAIT); if (aux_node == NULL) { device_printf(sc->dev, "failed to allocate aux node struct\n"); return; @@ -397,10 +397,7 @@ audio_soc_init(void *arg) } } - if (pcm_register(sc->dev, sc, 1, 1)) { - device_printf(sc->dev, "failed to register PCM\n"); - return; - } + pcm_init(sc->dev, sc); sc->play_channel.sc = sc; sc->rec_channel.sc = sc; @@ -408,7 +405,10 @@ audio_soc_init(void *arg) pcm_addchan(sc->dev, PCMDIR_PLAY, &audio_soc_chan_class, &sc->play_channel); pcm_addchan(sc->dev, PCMDIR_REC, &audio_soc_chan_class, &sc->rec_channel); - pcm_setstatus(sc->dev, "at simplebus"); + if (pcm_register(sc->dev, "at simplebus")) { + device_printf(sc->dev, "failed to register PCM\n"); + return; + } AUDIO_DAI_SETUP_INTR(sc->cpu_dev, audio_soc_intr, sc); AUDIO_DAI_SETUP_MIXER(sc->codec_dev, sc->dev); |