Bug 254459 - Sometimes Amarok cannot detect AudioCD's
Summary: Sometimes Amarok cannot detect AudioCD's
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Collections/CD (show other bugs)
Version: 2.4.0
Platform: PiSi Linux Linux
: HI normal
Target Milestone: 2.4.0
Assignee: Amarok Developers
URL:
Keywords:
: 254909 255019 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-10-17 14:58 UTC by Gökçen Eraslan
Modified: 2013-03-16 00:17 UTC (History)
11 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.4.2


Attachments
Debug output of a successful detection of Audio CD (32.40 KB, text/plain)
2010-10-17 14:58 UTC, Gökçen Eraslan
Details
Debug output of a failed detection of Audio CD (23.04 KB, text/plain)
2010-10-17 14:59 UTC, Gökçen Eraslan
Details
Debug output of a failed detection of Audio CD (Full debug output) (100.97 KB, text/plain)
2010-10-17 16:21 UTC, Gökçen Eraslan
Details
Debug output of a successful detection of Audio CD (Full debug output) (113.23 KB, text/plain)
2010-10-17 16:27 UTC, Gökçen Eraslan
Details
Output of amarok -d --nofork command, Audio CD is not detected after that command. (93.97 KB, text/plain)
2011-01-09 15:49 UTC, Gökçen Eraslan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gökçen Eraslan 2010-10-17 14:58:22 UTC
Created attachment 52612 [details]
Debug output of a successful detection of Audio CD

Version:           2.3.2 (using KDE 4.5.2) 
OS:                Linux

Sometimes Amarok behaves as if there is no audio cd in cdrom. But sometimes I can play audiocd's very well. I'm attaching debug outputs of two successive runs of Amarok. 

In amarok-audiocd.success file, debug output of the first run is written. In this run, I was able to see "Audio CD" entry in "Local Music" and played tracks very well.

In amarok-audiocd.fail file, debug output of the second run is written. In this run, "Local Music" section has just the "Local Collection" entry, "Audio CD" entry was missing.


Reproducible: Sometimes

Steps to Reproduce:
0. Put an audio cd to dvd rom drive.
1. Remove all config and applications files of Amarok
2. Run amarok.
3. See whether the "Local Music" section has "Audio CD" entry.

Actual Results:  
Sometimes there is no entry named "Audio CD" and I cannot play Audio CD's.

Expected Results:  
Audio CD entry should exist everytime if there is an Audio CD in drive.
Comment 1 Gökçen Eraslan 2010-10-17 14:59:38 UTC
Created attachment 52613 [details]
Debug output of a failed detection of Audio CD
Comment 2 Myriam Schweingruber 2010-10-17 15:59:07 UTC
Both attachments are not full debug outputs, as the header of the output states:

amarok:  ** DEBUGGING OUTPUT IS NOW ENABLED. PLEASE NOTE THAT YOU WILL ONLY SEE THE FULL OUTPUT ON THE NEXT START. ** 

You need to run this twice, ideally with the following command:

amarok -d --nofork

If you only run this once without you need to do this again, as this disables the debugging
.
Comment 3 Gökçen Eraslan 2010-10-17 16:21:54 UTC
Created attachment 52618 [details]
 Debug output of a failed detection of Audio CD  (Full debug output)
Comment 4 Gökçen Eraslan 2010-10-17 16:27:20 UTC
Created attachment 52619 [details]
Debug output of a successful detection of Audio CD (Full debug output)

I've tried very hard to make it work with "nofork" option but, it's impossible. Anyway, that is the second run with -d option, so a full debug output.
Comment 5 Gökçen Eraslan 2010-10-17 16:58:01 UTC
In failed detection output, it says:

MediaDeviceCollection] connection failed, not scanning

and in successful run:

MediaDeviceCollection] starting full scan

I think this is the main difference between both logs. 

Meta::AudioCdHandler::init method sometimes call m_memColl->slotAttemptConnectionDone( m_success ) with False parameter but I don't know the real reason.
Comment 6 Myriam Schweingruber 2010-10-17 18:31:54 UTC
Thank you for your fast feedback.
Comment 7 Mikko C. 2010-10-23 11:06:15 UTC
*** Bug 254909 has been marked as a duplicate of this bug. ***
Comment 8 Mikko C. 2010-10-23 11:08:56 UTC
*** Bug 255019 has been marked as a duplicate of this bug. ***
Comment 9 Myriam Schweingruber 2010-10-23 14:34:20 UTC
Confirmed and changed priority. Gökcen, please don't forget to set the distribution as well.
Comment 10 Gökçen Eraslan 2010-10-23 15:04:25 UTC
(In reply to comment #9)
> Confirmed and changed priority. Gökcen, please don't forget to set the
> distribution as well.

Amarok I've tried is from Pardus Pisi package, but I can't change it now. Maybe I don't have permission to do that.
Comment 11 Valter Mura 2010-10-24 00:06:21 UTC
Sorry, but I have to add that I cannot open the audio CD also with KsCD and Dolphin (the last returns to me an error if I try to open the audio CD)

I think that there's something else under the issue, related with KDE... JFYI
Comment 12 Myriam Schweingruber 2010-10-24 13:00:37 UTC
That sounds like a problem with either Solid or the audiocd KIO slave. Likely not an Amarok bug anyway. You should submit that to your distribution instead.
Comment 13 Gökçen Eraslan 2010-10-24 16:13:32 UTC
(In reply to comment #12)
> That sounds like a problem with either Solid or the audiocd KIO slave. Likely
> not an Amarok bug anyway. You should submit that to your distribution instead.

What do you mean by "sounds like" or "likely not"? How did you know that? Can you please explain? You've confirmed the bug and increased its priority yesterday, and now you're closing it just because a user told that he had problems with dolphin and kscd? If you think that this is a high priority bug, you should investigate it deeply and state a valid reason to close the bug, instead of "sounds like".

I'm the packager of my distro, and this is one of the complaints of our users about amarok. I'm filing this bug as the distro, and you're closing the bug without a valid explanation.

In #255019 a user said: "This isn't about KsCD, so don't insult your intelligence by suggesting it. This is Amarok's problem." If you accept all the thing users said as proof, this is also a proof.
Comment 14 Myriam Schweingruber 2010-10-24 16:29:32 UTC
Sorry for the noise, mistook the user for the OR.
Comment 15 Brian Wright 2010-11-09 06:44:24 UTC
I have experienced the exact same thing on Ubuntu 10.4 and 10.10

Konqueror will see an audio CD if I use the "audiocd:/" and I can then encode the contents.

Also, in Amarok, the audio CD will be read but the tracks will appear in the playlist on the right but an audio CD will not appear under Local Music

KsCD also crashes when trying to play an audio CD.

I agree with the above that this could be a problem with either the audiocd KIO slave or with Solid, given that KDE will detect that an audio CD has been inserted in the CD drive and can be read by Konqueror but not Amarok or KsCD.
Comment 16 Myriam Schweingruber 2010-11-09 13:07:33 UTC
Please report this downstream on launchpad so the Kubuntu developers can actually see there is a problem. Also don't forget to link to this bug.
This is really Kubuntu specific, no need to keep this open here.
Comment 17 Gökçen Eraslan 2010-11-09 13:59:56 UTC
(In reply to comment #16)
> Please report this downstream on launchpad so the Kubuntu developers can
> actually see there is a problem. Also don't forget to link to this bug.
> This is really Kubuntu specific, no need to keep this open here.

Please stop closing this bug as in comment #12. I don't use Kubuntu (look at comment #10) and I'm the one who reported this bug, how can you close this as downstream? Who is downstrem in this sense? I've sent you the debug output to investigate the bug and all you do is to close the bug as DOWNSTREAM.

AFAIK, this is _KDE_ bugzilla not amarok, and if you think that this is a Solid related problem, simply assign it to solid.
Comment 18 Myriam Schweingruber 2010-11-09 14:15:03 UTC
Ouch, I mistook that for yet another Kubuntu problem, since there is exactly the same reported there. Not my day...
Comment 19 Myriam Schweingruber 2010-11-09 14:17:16 UTC
Kevin, could you have a look at that, please? Not sure it is Solid or the KIO slave
Comment 20 Kevin Ottens 2010-11-22 19:04:25 UTC
I don't like when it says "Reproducible: Sometimes". ;-)

From the description I would *assume* it's a problem in libsolid or HAL. There might be a way to know if that's a problem with HAL or not. Could you try using "lshal --monitor" and give us the output for a case where the detection of the Audio CD worked, and for a case where it didn't?

If everything is fine in HAL both output should be identical (in which case it'd be an issue in the libsolid hal backend I guess), otherwise they would be something fishy there.

Note that I'm excluding amarok from the picture upfront, but that's a bit quick. There's far too much debug output in what you provided so far and I don't know Amarok well enough to know if everything is right there or not. And since I don't know Amarok that well I'm focusing on the lower stacks. ;-)
Comment 21 Gökçen Eraslan 2010-11-22 19:41:37 UTC
Let me clarify 'Reproducible: Sometimes'. Every time I insert an Audio CD, I see device notifier pops up about the audio CD, and every time I insert an Audio CD, I can see singer and song names in audiocd:/ and kscd, and playback in kscd is always perfect.

A minute ago, I've inserted an audio cd, and tried it with audiocd:/, kscd and amarok several times. kscd and audiocd:/ is always fine, but amarok does not detect audio cd in some runs.

I think there is nothing to do with hal, since I can play audio cd with kscd every time I insert a CD, but problem is in amarok. 

Here is the lshal output when removed audio cd:

20:23:30.367: storage_model_HL_DT_ST_DVDRW__GS21N property storage.removable.media_available = false
20:23:30.444: storage_model_HL_DT_ST_DVDRW__GS21N property storage.cdrom.write_speeds = {'4234', '2823', '1764', '706'}
20:23:30.453: volume_part_1_size_497690624 removed


and inserted audio cd:


20:23:51.339: storage_model_HL_DT_ST_DVDRW__GS21N property storage.removable.media_available = true                                                                                   
20:23:51.360: storage_model_HL_DT_ST_DVDRW__GS21N property storage.cdrom.write_speeds = {'4234', '2823', '1764', '706'}                                                               
20:23:51.438: volume_part_1_size_497690624 added
Comment 22 Kevin Ottens 2010-11-22 20:04:34 UTC
Ah ok, sorry I misread you then. From the extra background provided by your latest comment, it's definitely an Amarok specific issue. Kscd uses libsolid as well for the detection, so it's definitely not there or lower in the stack (like HAL). Definitely application specific then.

Since we eliminated all the possible culprits I was responsible for, the mic is now to the Amarok dudes and dudettes.
Comment 23 Valter Mura 2010-11-22 21:05:19 UTC
Let me add: for me it is *always* reproducible, that's to say I cannot open it neither with Amarok, nor with KsCD, Audex and Dolphin. Amarok *sees* the cd but cannot handle it. KsCD and Audex cannot see the cd, while Dolphin returns a popup "Error: cannot read".
The only app that works correctly is K3B with which I can extract the tracks.

Dolphin *can open* correctly a data cd in the same device.

I must say that I have another device that have difficulties in reading (recognizing) cds, but handle well dvds (but I think it is an issue for a firmware update I made some years ago)

Here is the result of the lshal output:

(cd inserted)

valter@valter-rete:~$ lshal --monitor

Start monitoring devicelist:
-------------------------------------------------
20:39:31.769: storage_model_DVD_Writer_300c property storage.removable.media_available = true
20:39:31.981: storage_model_DVD_Writer_300c property storage.removable.media_size = 435353600 (0x19f2f800) (new)
20:39:32.028: storage_model_DVD_Writer_300c property storage.cdrom.write_speeds = {'2822', '2117', '1411'}
20:39:32.191: volume_part_1_size_435353600 added

(cd ejected)

20:48:28.032: storage_model_DVD_Writer_300c property storage.removable.media_available = false
20:48:28.091: storage_model_DVD_Writer_300c property storage.cdrom.write_speeds = {'2822', '2117', '1411'}
20:48:28.122: volume_part_1_size_435353600 removed

*****************
*This output is for a data cd*, correctly detected and handled

Start monitoring devicelist:
-------------------------------------------------
21:03:12.066: storage_model_DVD_Writer_300c property storage.removable.media_available = true
21:03:12.104: storage_model_DVD_Writer_300c property storage.cdrom.write_speeds = {'2822', '2117', '1411'}
21:03:14.924: volume_label_giochi added
21:03:43.046: storage_model_DVD_Writer_300c property storage.removable.media_available = false
21:03:43.092: storage_model_DVD_Writer_300c property storage.cdrom.write_speeds = {'2822', '2117', '1411'}
21:03:43.098: volume_label_giochi removed
*************************


Regards,
Valter
Comment 24 Michael Jansen 2011-01-09 05:35:03 UTC
The main problem behind all of this is that amarok uses the audiocd slave wrongly. It fails to tell the audiocd slave which device it wants to play.

So this is likely a duplicate to https://bugs.kde.org/show_bug.cgi?id=230462

Everyone in here having problem please input a audio cd and then do ls /dev/cdrom* . If you see /dev/cdrom it should work. If you see /dev/cdrom[1-x] it should not work and is the same as 230462. Please note that you do not actually have to have two drives. It is enough if in the lifetime of your installation there was a different drive available.

If you want to know more look at /etc/udev/rules.d/70-persistent-cd.rules (on OpenSuSE). That file only exists if your distro uses udev. It could be somewhere else too.

This is how it looked for me.

#  (pci-0000:04:00.1-scsi-0:0:0:0)
ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:04:00.1-scsi-0:0:0:0", SYMLINK+="cdrom", ENV{GENERATED}="1"
ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:04:00.1-scsi-0:0:0:0", SYMLINK+="cdrw", ENV{GENERATED}="1"
ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:04:00.1-scsi-0:0:0:0", SYMLINK+="dvd", ENV{GENERATED}="1"
ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:04:00.1-scsi-0:0:0:0", SYMLINK+="dvdrw", ENV{GENERATED}="1"
# DVDRAM_GSA-4167B (pci-0000:04:00.1-scsi-0:0:1:0)
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:04:00.1-scsi-0:0:1:0", SYMLINK+="cdrom1", ENV{GENERATED}="1"
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:04:00.1-scsi-0:0:1:0", SYMLINK+="cdrw1", ENV{GENERATED}="1"
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:04:00.1-scsi-0:0:1:0", SYMLINK+="dvd1", ENV{GENERATED}="1"
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:04:00.1-scsi-0:0:1:0", SYMLINK+="dvdrw1", ENV{GENERATED}="1"

The first drive is not there anymore. If i remove that file and reboot things start to work again. The file is recreated on reboot. It looks like this then and works.

# DVDRAM_GSA-4167B (pci-0000:04:00.1-scsi-0:0:1:0)
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:04:00.1-scsi-0:0:1:0", SYMLINK+="cdrom", ENV{GENERATED}="1"
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:04:00.1-scsi-0:0:1:0", SYMLINK+="cdrw", ENV{GENERATED}="1"
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:04:00.1-scsi-0:0:1:0", SYMLINK+="dvd", ENV{GENERATED}="1"
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:04:00.1-scsi-0:0:1:0", SYMLINK+="dvdrw", ENV{GENERATED}="1"

@Brian Wright:

The kscd crash is related. I fixed the crash with http://websvn.kde.org/?view=revision&revision=1212979 . But kscd still cannot read the cd . It seems to have a similar problem like amarok but doesn't use audiocd. It looks under /dev/cdrom even if the disc appears under /dev/cdrom1 .
Comment 25 Michael Jansen 2011-01-09 05:36:14 UTC
commit 121f91675dbf68072cefe486ccdabfff922cc0d5
branch master
Author: Michael Jansen <kde@michael-jansen.biz>
Date:   Sun Jan 9 05:09:57 2011 +0100

    If the music cd is in /dev/cdrom[1-x] and not /dev/cdrom amarok failed to read the cd. For
    me it showed up as having no tracks. Now call the audiocd io slave with the correct device
    
    audiocd:/<path>?device=/dev/sr0
    
    Kudos to Kevin Ottens for the explanation. Hacking solid was no fun tho.
    
    BUG: 230462
    
    These bugs please check if it helps for your problem too.
    
    CCBUG: 254459

diff --git a/src/MediaDeviceCache.cpp b/src/MediaDeviceCache.cpp
index babb8ff..6f0c17e 100644
--- a/src/MediaDeviceCache.cpp
+++ b/src/MediaDeviceCache.cpp
@@ -30,6 +30,7 @@
 #include <solid/portablemediaplayer.h>
 #include <solid/storageaccess.h>
 #include <solid/storagedrive.h>
+#include <solid/block.h>
 #include <solid/storagevolume.h>
 
 #include <QDir>
@@ -318,6 +319,28 @@ MediaDeviceCache::deviceName( const QString &udi ) const
     return "ERR_NO_NAME"; //Should never happen!
 }
 
+const QString
+MediaDeviceCache::device( const QString &udi ) const
+{
+    DEBUG_BLOCK
+    Solid::Device device( udi );
+    Solid::Device parent( device.parent() );
+    if( !parent.isValid() )
+    {
+        debug() << udi << "has no parent, returning null string.";
+        return QString();
+    }
+
+    Solid::Block* sb = parent.as<Solid::Block>();
+    if( !sb  )
+    {
+        debug() << parent.udi() << "failed to convert to Block, returning null string.";
+        return QString();
+    }
+
+    return sb->device();
+}
+
 bool
 MediaDeviceCache::isGenericEnabled( const QString &udi ) const
 {
diff --git a/src/MediaDeviceCache.h b/src/MediaDeviceCache.h
index 11f0c01..7e8cd65 100644
--- a/src/MediaDeviceCache.h
+++ b/src/MediaDeviceCache.h
@@ -49,6 +49,7 @@ class AMAROK_EXPORT MediaDeviceCache : public QObject
         const QStringList getAll() const { return m_type.keys(); }
         MediaDeviceCache::DeviceType deviceType( const QString &udi ) const;
         const QString deviceName( const QString &udi ) const;
+        const QString device( const QString & udi ) const;
         bool isGenericEnabled( const QString &udi ) const;
         const QString volumeMountPoint( const QString &udi ) const;
 
diff --git a/src/core-impl/collections/audiocd/AudioCdCollection.cpp b/src/core-impl/collections/audiocd/AudioCdCollection.cpp
index 6cfbfb9..cb404f8 100644
--- a/src/core-impl/collections/audiocd/AudioCdCollection.cpp
+++ b/src/core-impl/collections/audiocd/AudioCdCollection.cpp
@@ -70,6 +70,7 @@ AudioCdCollection::AudioCdCollection( MediaDeviceInfo* info )
     debug() << "Getting Audio CD info";
     AudioCdDeviceInfo *cdInfo = qobject_cast<AudioCdDeviceInfo *>( info );
     m_udi = cdInfo->udi();
+    m_device = cdInfo->device();
 
     readAudioCdSettings();
 
@@ -85,7 +86,10 @@ AudioCdCollection::~AudioCdCollection()
 KUrl
 AudioCdCollection::audiocdUrl( const QString & path ) const
 {
-    return KUrl( QString( "audiocd:/" ) + path );
+    if (m_device.isNull())
+        return KUrl( QString( "audiocd:/" + path ) );
+    else
+        return KUrl( QString( "audiocd:/%1?device=%2" ).arg( path ).arg( m_device ) );
 }
 
 
diff --git a/src/core-impl/collections/audiocd/AudioCdCollection.h b/src/core-impl/collections/audiocd/AudioCdCollection.h
index a2f5935..54cd4d8 100644
--- a/src/core-impl/collections/audiocd/AudioCdCollection.h
+++ b/src/core-impl/collections/audiocd/AudioCdCollection.h
@@ -117,6 +117,7 @@ private:
     QString m_cdName;
     QString m_discCddbId;
     QString m_udi;
+    QString m_device;
     mutable int m_encodingFormat;
 
     QString m_fileNamePattern;
diff --git a/src/core-impl/collections/audiocd/support/AudioCdConnectionAssistant.cpp b/src/core-impl/collections/audiocd/support/AudioCdConnectionAssistant.cpp
index 3ca90fd..fc90e66 100644
--- a/src/core-impl/collections/audiocd/support/AudioCdConnectionAssistant.cpp
+++ b/src/core-impl/collections/audiocd/support/AudioCdConnectionAssistant.cpp
@@ -55,9 +55,8 @@ AudioCdConnectionAssistant::identify( const QString& udi )
 MediaDeviceInfo*
 AudioCdConnectionAssistant::deviceInfo( const QString& udi )
 {
-    const QString mountpoint = MediaDeviceCache::instance()->volumeMountPoint(udi);
-
-    return new AudioCdDeviceInfo( mountpoint, udi );
+    const QString device = MediaDeviceCache::instance()->device(udi);
+    return new AudioCdDeviceInfo( device, udi );
 }
 
 #include "AudioCdConnectionAssistant.moc"
diff --git a/src/core-impl/collections/audiocd/support/AudioCdDeviceInfo.cpp b/src/core-impl/collections/audiocd/support/AudioCdDeviceInfo.cpp
index 1a6ad7a..e971510 100644
--- a/src/core-impl/collections/audiocd/support/AudioCdDeviceInfo.cpp
+++ b/src/core-impl/collections/audiocd/support/AudioCdDeviceInfo.cpp
@@ -17,9 +17,9 @@
 #include "AudioCdDeviceInfo.h"
 #include "MediaDeviceInfo.h"
 
-AudioCdDeviceInfo::AudioCdDeviceInfo( QString mountpoint, QString udi )
+AudioCdDeviceInfo::AudioCdDeviceInfo( QString device, QString udi )
 : MediaDeviceInfo(),
-m_mountpoint( mountpoint )
+m_device( device )
 {
     m_udi = udi;
 }
@@ -29,9 +29,9 @@ AudioCdDeviceInfo::~AudioCdDeviceInfo()
 }
 
 QString
-AudioCdDeviceInfo::mountpoint()
+AudioCdDeviceInfo::device()
 {
-    return m_mountpoint;
+    return m_device;
 }
 
 #include "AudioCdDeviceInfo.moc"
diff --git a/src/core-impl/collections/audiocd/support/AudioCdDeviceInfo.h b/src/core-impl/collections/audiocd/support/AudioCdDeviceInfo.h
index b1d0949..499a391 100644
--- a/src/core-impl/collections/audiocd/support/AudioCdDeviceInfo.h
+++ b/src/core-impl/collections/audiocd/support/AudioCdDeviceInfo.h
@@ -23,13 +23,13 @@ class AudioCdDeviceInfo : public MediaDeviceInfo
 {
     Q_OBJECT
     public:
-        AudioCdDeviceInfo( QString mountpoint, QString udi );
+        AudioCdDeviceInfo( QString device, QString udi );
         ~AudioCdDeviceInfo();
 
-        QString mountpoint();
+        QString device();
 
     private:
-        QString m_mountpoint;
+        QString m_device;
 };
 
 #endif
Comment 26 Gökçen Eraslan 2011-01-09 15:49:51 UTC
Created attachment 55769 [details]
Output of amarok -d --nofork command, Audio CD is not detected after that command.

(In reply to comment #25)
...
>     These bugs please check if it helps for your problem too.
> 
>     CCBUG: 254459

Unfortunately I can still reproduce the bug with 

Amarok 2.3.90 + git commit 121f91675dbf68072cefe486ccdabfff922cc0d5 + ba7976e63170cce28226043557466282f1161e12.

I'm attaching the output of 'amarok -d --nofork' command produced in one of the runs that Audio CD is not detected by Amarok.
Comment 27 Michael Jansen 2011-01-09 16:41:11 UTC
@Gokcen: Could you please have a look at comment 24 if the bugfix applies to you?

There is btw. a bug that seems to prevent amarok from using cd's that are inserted then it is started. 

1. Start Amarok
2. Now insert the cd.

If it doesn't work then your problem is different.

Mike
Comment 28 Gökçen Eraslan 2011-01-09 17:19:41 UTC
(In reply to comment #27)
> @Gokcen: Could you please have a look at comment 24 if the bugfix applies to
> you?
> 

I see /dev/cdrom always.

> There is btw. a bug that seems to prevent amarok from using cd's that are
> inserted then it is started. 
> 
> 1. Start Amarok
> 2. Now insert the cd.
> 
> If it doesn't work then your problem is different.
> 

There is no problem if I insert CD after I start Amarok, it detects it. But if I start Amarok when a CD is already inserted, _sometimes_ amarok does not detect it. 

I think there is a race condition during startup, because when I run amarok with "-d" parameter it's very rare to reproduce the error, but if I don't give -d parameter it's more often.

> Mike
Comment 29 Igor 2011-04-07 08:39:19 UTC
I can see AudioCD if it's inserted after amarok start, but I cannot play it (and can with vlc). I use amarok-git in Archlinux. Is it the same issue or another one?

And yes, I'm not able to see AudioCD if amarok is started after I insert it.
Comment 30 Myriam Schweingruber 2011-06-04 12:16:06 UTC
This is an automated message from the triager:

Amarok 2.4.1 has been released on May 8 already. Could you please upgrade and test if you can still reproduce this bug?

Without feedback within a month we will close this bug as resolved.

Thank you for your understanding.
Comment 31 paul.leopardi 2011-06-05 14:17:45 UTC
I have tried Amarok 2.4.1 from OpenSUSE RPMs.Package amarok-2.4.1-118.2-x86_64 This results in:

Amarok could not find any collection plugins. It is possible that Amarok is installed under the wrong prefix, please fix your installation using:
$ cd /path/to/amarok/source-code/
$ su -c "make uninstall"
$ cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` && su -c "make install"
$ kbuildsycoca4 --noincremental
$ amarok
More information can be found in the README file. For further assistance join us at #amarok on irc.freenode.net.

This is possibly related to 
http://lists.kde.org/?l=amarok-devel&m=130039028901405&w=2
Comment 32 paul.leopardi 2011-06-05 14:25:46 UTC
After running 
kbuildsycoca4 --noincremental
amarok 2.4.1 starts, but "Local Music" does not show "Audio CD"
Comment 33 Myriam Schweingruber 2011-06-05 16:21:52 UTC
Thank you for the fast feedback. I just got aware that this is already fixed in current Amarok 2.4-git
Comment 34 paul.leopardi 2011-08-28 05:44:05 UTC
With Amarok 2.4.3 on KDE 4.7 using openSUSE 11.3, I see the behaviour described in bug 277550.