staging: most: sound: create one sound card w/ multiple PCM devices per MOST device
authorChristian Gromm <christian.gromm@microchip.com>
Mon, 17 Dec 2018 14:10:12 +0000 (15:10 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Dec 2018 15:10:20 +0000 (16:10 +0100)
commit15600aea2754c3f0cd3440b95b91bbf1602a3fca
tree0ef2e838cc0da7a54f483c733ebdd544b46b41dc
parent2074e8a7d0257185c290e25d29a52d9601ee8701
staging: most: sound: create one sound card w/ multiple PCM devices per MOST device

This patch avoids that a sound card is created and registered with ALSA
every time a channel is being linked. Instead the channels are hooked on
the same card, which is registered not until the final link has been added
to the component. The string provided by user space that used to be the
card name becomes the PCM device name. The user space API to add a link is
being expanded by a "create" flag to trigger the registration.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/most/sound/sound.c