Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 33207
b: refs/heads/master
c: 6e8331a
h: refs/heads/master
i:
  33205: e226dfa
  33203: 4e94078
  33199: 5353c2e
v: v3
  • Loading branch information
Johannes Berg authored and Jaroslav Kysela committed Aug 3, 2006
1 parent ea1e778 commit 2b04bac
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2566d36ab4f0b90141bb59a5f7342255751fbf45
refs/heads/master: 6e8331ac6973435b1e7604c30f2ad394035b46e1
17 changes: 13 additions & 4 deletions trunk/sound/aoa/codecs/snd-aoa-codec-toonie.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ static struct transfer_info toonie_transfers[] = {
{}
};

static int toonie_usable(struct codec_info_item *cii,
struct transfer_info *ti,
struct transfer_info *out)
{
return 1;
}

#ifdef CONFIG_PM
static int toonie_suspend(struct codec_info_item *cii, pm_message_t state)
{
Expand All @@ -69,6 +76,7 @@ static struct codec_info toonie_codec_info = {
.sysclock_factor = 256,
.bus_factor = 64,
.owner = THIS_MODULE,
.usable = toonie_usable,
#ifdef CONFIG_PM
.suspend = toonie_suspend,
.resume = toonie_resume,
Expand All @@ -79,19 +87,20 @@ static int toonie_init_codec(struct aoa_codec *codec)
{
struct toonie *toonie = codec_to_toonie(codec);

/* nothing connected? what a joke! */
if (toonie->codec.connected != 1)
return -ENOTCONN;

if (aoa_snd_device_new(SNDRV_DEV_LOWLEVEL, toonie, &ops)) {
printk(KERN_ERR PFX "failed to create toonie snd device!\n");
return -ENODEV;
}

/* nothing connected? what a joke! */
if (toonie->codec.connected != 1)
return -ENOTCONN;

if (toonie->codec.soundbus_dev->attach_codec(toonie->codec.soundbus_dev,
aoa_get_card(),
&toonie_codec_info, toonie)) {
printk(KERN_ERR PFX "error creating toonie pcm\n");
snd_device_free(aoa_get_card(), toonie);
return -ENODEV;
}

Expand Down

0 comments on commit 2b04bac

Please sign in to comment.